Update failing test

This commit is contained in:
Maciej Szlosarczyk 2018-08-07 14:56:19 +03:00
parent e3807f694d
commit abb1ad60e8
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
2 changed files with 3 additions and 3 deletions

View file

@ -29,7 +29,7 @@ module Api
if @domain
render json: @domain
else
render json: { errors: ['Domain not found'] }, status: :not_found
render json: { errors: [{ base: ['Domain not found'] }] }, status: :not_found
end
end

View file

@ -35,7 +35,7 @@ class RegistrantApiDomainsTest < ActionDispatch::IntegrationTest
assert_equal(404, response.status)
response_json = JSON.parse(response.body, symbolize_names: true)
assert_equal({errors: ['Domain not found']}, response_json)
assert_equal({ errors: [base: ['Domain not found']] }, response_json)
end
def test_root_returns_domain_list
@ -89,7 +89,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