mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Update documentation for registry lock.
Also, make rewrite the return error message using better grammar
This commit is contained in:
parent
0c7c8eb480
commit
97617764fb
3 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ module Api
|
||||||
if @domain.remove_registry_lock
|
if @domain.remove_registry_lock
|
||||||
render json: @domain
|
render json: @domain
|
||||||
else
|
else
|
||||||
render json: { errors: [{ base: ['Domain not locked'] }] },
|
render json: { errors: [{ base: ['Domain is not locked'] }] },
|
||||||
status: :unprocessable_entity
|
status: :unprocessable_entity
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -139,12 +139,12 @@ Content-Type: application/json
|
||||||
#### Response for failure
|
#### Response for failure
|
||||||
|
|
||||||
```
|
```
|
||||||
HTTP/1.1 400
|
HTTP/1.1 422
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"errors": [
|
"errors": [
|
||||||
{ "base": "domain cannot be unlocked" }
|
{ "base": "Domain is not locked" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ class RegistrantApiDomainRegistryLockTest < ApplicationIntegrationTest
|
||||||
|
|
||||||
response_json = JSON.parse(response.body, symbolize_names: true)
|
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||||
assert_equal(422, response.status)
|
assert_equal(422, response.status)
|
||||||
assert_equal({ errors: [{ base: ['Domain not locked'] }] }, response_json)
|
assert_equal({ errors: [{ base: ['Domain is not locked'] }] }, response_json)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_returns_404_when_domain_is_not_found
|
def test_returns_404_when_domain_is_not_found
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue