Commit 2d33bd9d authored by Justin Ho's avatar Justin Ho

Update spec to cover casting of value to bool

parent 1cc367e9
...@@ -55,12 +55,12 @@ RSpec.describe ServiceFieldEntity do ...@@ -55,12 +55,12 @@ RSpec.describe ServiceFieldEntity do
end end
context 'EmailsOnPush Service' do context 'EmailsOnPush Service' do
let(:service) { create(:emails_on_push_service) } let(:service) { create(:emails_on_push_service, send_from_committer_email: '1') }
context 'field with type checkbox' do context 'field with type checkbox' do
let(:field) { service.global_fields.find { |field| field[:name] == 'send_from_committer_email' } } let(:field) { service.global_fields.find { |field| field[:name] == 'send_from_committer_email' } }
it 'exposes correct attributes' do it 'exposes correct attributes and casts value to Boolean' do
expected_hash = { expected_hash = {
type: 'checkbox', type: 'checkbox',
name: 'send_from_committer_email', name: 'send_from_committer_email',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment