Add Registrant API contact update action

Closes #849
This commit is contained in:
Artur Beljajev 2018-08-20 17:19:54 +03:00
parent 90ed23f64d
commit b6ecae6a35
41 changed files with 1239 additions and 61 deletions

View file

@ -26,4 +26,16 @@ class ContactTest < ActiveSupport::TestCase
def test_not_in_use_if_acts_as_neither_registrant_nor_domain_contact
refute contacts(:not_in_use).in_use?
end
def test_managed_when_identity_codes_match
contact = Contact.new(ident: '1234')
user = RegistrantUser.new(registrant_ident: 'US-1234')
assert contact.managed_by?(user)
end
def test_unmanaged_when_identity_codes_do_not_match
contact = Contact.new(ident: '1234')
user = RegistrantUser.new(registrant_ident: 'US-12345')
assert_not contact.managed_by?(user)
end
end