mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Make authentication errors more consistent with other errors
This commit is contained in:
parent
c1ea79615f
commit
ad8dfcc28f
4 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ class RegistrantApiAuthenticationTest < ActionDispatch::IntegrationTest
|
|||
assert_equal(401, response.status)
|
||||
json_body = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal({ errors: ['Not authorized'] }, json_body)
|
||||
assert_equal({ errors: [base: ['Not authorized']] }, json_body)
|
||||
|
||||
ENV['registrant_api_auth_allowed_ips'] = @original_whitelist_ip
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ class RegistrantApiDomainsTest < ActionDispatch::IntegrationTest
|
|||
assert_equal(401, response.status)
|
||||
json_body = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal({ errors: ['Not authorized'] }, json_body)
|
||||
assert_equal({ errors: [base: ['Not authorized']] }, json_body)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue