mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +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
|
@ -150,13 +150,12 @@ class ContactTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
def test_returns_registrant_user_indirect_contacts
|
||||
@contact.update!(ident_type: Contact::ORG)
|
||||
assert_equal '1234', @contact.ident
|
||||
@contact.update!(ident_type: Contact::ORG, ident: '1234321')
|
||||
assert_equal 'US', @contact.ident_country_code
|
||||
registrant_user = RegistrantUser.new(registrant_ident: 'US-1234')
|
||||
registrant_user = RegistrantUser.new(registrant_ident: 'US-1234321')
|
||||
|
||||
registrant_user.stub(:companies, [OpenStruct.new(registration_number: '1234')]) do
|
||||
assert_equal [@contact], Contact.registrant_user_contacts(registrant_user)
|
||||
registrant_user.stub(:companies, [OpenStruct.new(registration_number: '1234321')]) do
|
||||
assert_equal registrant_user.contacts, Contact.registrant_user_contacts(registrant_user)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue