Skip to content

Commit

Permalink
Fixing test in order to get 100% coverage.
Browse files Browse the repository at this point in the history
Fixes CV2-5621.
  • Loading branch information
caiosba committed Nov 6, 2024
1 parent 7c3737d commit c483b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/models/bot/smooch_6_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@ def send_message_outside_24_hours_window(template, pm = nil)
end

test "should get dynamic resource on tipline bot v2" do
WebMock.stub_request(:get, /googleapis\.com\/civicinfo/).to_return(body: { pollingLocations: [{ address: {} }], earlyVoteSites: [{ address: {} }] }.to_json)
civic_api_mocked_data = { pollingLocations: [{ address: {}, startDate: '2024-11-01', endDate: '2024-11-05', pollingHours: '7am - 5pm' }], earlyVoteSites: [{ address: {}, startDate: '2024-11-01', endDate: '2024-11-05', pollingHours: '7am - 5pm' }] }
WebMock.stub_request(:get, /googleapis\.com\/civicinfo/).to_return(body: civic_api_mocked_data.to_json)
stub_configs({ 'google_api_key' => random_string }) do
@resource.content_type = 'dynamic'
@resource.save!
Expand Down

0 comments on commit c483b84

Please sign in to comment.