mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
Add company controlled contacts to registrant API
Fix tests.
This commit is contained in:
parent
735a0e1642
commit
c4de5655e1
8 changed files with 45 additions and 35 deletions
|
@ -75,8 +75,11 @@ class RegistrantApiV1ContactDetailsTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_unmanaged_contact_cannot_be_accessed
|
||||
assert_equal 'US-1234', @user.registrant_ident
|
||||
@contact.update!(ident: '12345')
|
||||
@user.update!(registrant_ident: 'US-12345')
|
||||
@contact.update!(ident: '12345879')
|
||||
companies = Contact.where(ident_type: 'org')
|
||||
companies.update_all(ident: '78964521')
|
||||
companies.reload
|
||||
|
||||
get api_v1_registrant_contact_path(@contact.uuid), as: :json,
|
||||
headers: { 'HTTP_AUTHORIZATION' => auth_token }
|
||||
|
@ -93,4 +96,4 @@ class RegistrantApiV1ContactDetailsTest < ActionDispatch::IntegrationTest
|
|||
hash = token_creator.token_in_hash
|
||||
"Bearer #{hash[:access_token]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue