Skip to content

Commit

Permalink
Fix tests with new ruby versions and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fab-girard committed Feb 7, 2024
1 parent 14e3d5c commit 5b318fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/api/v01/bulk_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def test_use_quotas
]}
assert_equal 429, last_response.status
assert JSON.parse(last_response.body)['message'].include?('Too many monthly requests')
assert_equal({ "Content-Type" => "application/json; charset=UTF-8",
"X-RateLimit-Limit" => 2,
"X-RateLimit-Remaining" => 0,
"X-RateLimit-Reset" => Time.now.utc.to_date.next_month.to_time.to_i }, last_response.headers)
assert_equal({ "content-type" => "application/json; charset=UTF-8",
"x-ratelimit-limit" => 2,
"x-ratelimit-remaining" => 0,
"x-ratelimit-reset" => Time.now.utc.to_date.next_month.to_time.to_i }, last_response.headers)
end

def test_should_geocode_when_at_least_one_of_query_postcode_city_street
Expand Down
8 changes: 4 additions & 4 deletions test/api/v01/unitary_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def test_use_quotas
patch '/0.1/geocode', {api_key: 'bulk_limit', query: 'Place Pey Berland, Bordeaux', country: 'demo'}
assert_equal 429, last_response.status
assert JSON.parse(last_response.body)['message'].include?('Too many daily requests')
assert_equal({ "Content-Type" => "application/json; charset=UTF-8",
"X-RateLimit-Limit" => 1,
"X-RateLimit-Remaining" => 0,
"X-RateLimit-Reset" => Time.now.utc.to_date.next_day.to_time.to_i }, last_response.headers)
assert_equal({ "content-type" => "application/json; charset=UTF-8",
"x-ratelimit-limit" => 1,
"x-ratelimit-remaining" => 0,
"x-ratelimit-reset" => Time.now.utc.to_date.next_day.to_time.to_i }, last_response.headers)
end

def test_nil_quotas
Expand Down

0 comments on commit 5b318fb

Please sign in to comment.