mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
Fix tests
This commit is contained in:
parent
7a7cd6be08
commit
e65d55765a
3 changed files with 5 additions and 87 deletions
|
@ -49,11 +49,11 @@ class ReppV1ContactsSearchTest < ActionDispatch::IntegrationTest
|
|||
ENV["shunter_enabled"] = 'true'
|
||||
|
||||
get '/repp/v1/contacts/search', headers: @auth_headers, params: { query: '000' }
|
||||
get '/repp/v1/contacts/search', headers: @auth_headers, params: { query: 'j' }
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal json[:code], 2502
|
||||
assert response.body.include?(Shunter.default_error_message)
|
||||
assert_raise Shunter::ThrottleError do
|
||||
get '/repp/v1/contacts/search', headers: @auth_headers, params: { query: '000' }
|
||||
end
|
||||
|
||||
ENV["shunter_default_threshold"] = '10000'
|
||||
ENV["shunter_enabled"] = 'false'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue