mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Eliminate mystery guest
This commit is contained in:
parent
63e8a09f5a
commit
66e83ccb58
1 changed files with 11 additions and 6 deletions
|
@ -20,17 +20,22 @@ class RegistrantApiV1ContactUpdateTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_update_contact
|
||||
patch api_v1_registrant_contact_path(@contact.uuid), { name: 'new name',
|
||||
email: 'new-email@coldmail.test',
|
||||
phone: '+666.6' }.to_json,
|
||||
@contact.update!(name: 'John',
|
||||
email: 'john@shop.test',
|
||||
phone: '+111.1')
|
||||
|
||||
patch api_v1_registrant_contact_path(@contact.uuid), { name: 'William',
|
||||
email: 'william@shop.test',
|
||||
phone: '+222.2' }.to_json,
|
||||
'HTTP_AUTHORIZATION' => auth_token,
|
||||
'Accept' => Mime::JSON,
|
||||
'Content-Type' => Mime::JSON.to_s
|
||||
assert_response :ok
|
||||
@contact.reload
|
||||
assert_equal 'new name', @contact.name
|
||||
assert_equal 'new-email@coldmail.test', @contact.email
|
||||
assert_equal '+666.6', @contact.phone
|
||||
|
||||
assert_equal 'William', @contact.name
|
||||
assert_equal 'william@shop.test', @contact.email
|
||||
assert_equal '+222.2', @contact.phone
|
||||
end
|
||||
|
||||
def test_notify_registrar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue