mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Update failing test
This commit is contained in:
parent
e3807f694d
commit
abb1ad60e8
2 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ module Api
|
||||||
if @domain
|
if @domain
|
||||||
render json: @domain
|
render json: @domain
|
||||||
else
|
else
|
||||||
render json: { errors: ['Domain not found'] }, status: :not_found
|
render json: { errors: [{ base: ['Domain not found'] }] }, status: :not_found
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class RegistrantApiDomainsTest < ActionDispatch::IntegrationTest
|
||||||
assert_equal(404, response.status)
|
assert_equal(404, response.status)
|
||||||
|
|
||||||
response_json = JSON.parse(response.body, symbolize_names: true)
|
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
|
end
|
||||||
|
|
||||||
def test_root_returns_domain_list
|
def test_root_returns_domain_list
|
||||||
|
@ -89,7 +89,7 @@ class RegistrantApiDomainsTest < ActionDispatch::IntegrationTest
|
||||||
assert_equal(401, response.status)
|
assert_equal(401, response.status)
|
||||||
json_body = JSON.parse(response.body, symbolize_names: true)
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue