mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Do not show contact if given domain does not belong to the current user
This commit is contained in:
parent
5a466206bf
commit
c89cce6287
7 changed files with 39 additions and 7 deletions
|
@ -25,7 +25,7 @@ class RegistrantApiContactsTest < ApplicationIntegrationTest
|
|||
assert_equal(200, response.status)
|
||||
|
||||
json_body = JSON.parse(response.body, symbolize_names: true)
|
||||
assert_equal(5, json_body.count)
|
||||
assert_equal(4, json_body.count)
|
||||
array_of_contact_codes = json_body.map { |x| x[:code] }
|
||||
assert(array_of_contact_codes.include?('william-001'))
|
||||
assert(array_of_contact_codes.include?('jane-001'))
|
||||
|
@ -39,7 +39,7 @@ class RegistrantApiContactsTest < ApplicationIntegrationTest
|
|||
|
||||
get '/api/v1/registrant/contacts', {}, @auth_headers
|
||||
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||
assert_equal(5, response_json.count)
|
||||
assert_equal(4, response_json.count)
|
||||
end
|
||||
|
||||
def test_get_contact_details_by_uuid
|
||||
|
|
|
@ -57,7 +57,7 @@ class RegistrantApiDomainsTest < ApplicationIntegrationTest
|
|||
get '/api/v1/registrant/domains', {}, @auth_headers
|
||||
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal(5, response_json.count)
|
||||
assert_equal(4, response_json.count)
|
||||
end
|
||||
|
||||
def test_root_does_not_accept_limit_higher_than_200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue