Merge pull request #1644 from internetee/1642-refactor-registrant-api-contacts

Add company contacts to registrant API
This commit is contained in:
Timo Võhmar 2020-08-26 14:59:32 +03:00 committed by GitHub
commit dfe29fa986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 48 additions and 18 deletions

View file

@ -214,6 +214,9 @@ class RegistrantApiV1ContactUpdateTest < ActionDispatch::IntegrationTest
def test_unmanaged_contact_cannot_be_updated
assert_equal 'US-1234', @user.registrant_ident
@contact.update!(ident: '12345')
companies = Contact.where(ident_type: 'org')
companies.update_all(ident: '78964521')
companies.reload
patch api_v1_registrant_contact_path(@contact.uuid), params: { name: 'new name' },
as: :json,