mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +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
|
end
|
||||||
|
|
||||||
def test_update_contact
|
def test_update_contact
|
||||||
patch api_v1_registrant_contact_path(@contact.uuid), { name: 'new name',
|
@contact.update!(name: 'John',
|
||||||
email: 'new-email@coldmail.test',
|
email: 'john@shop.test',
|
||||||
phone: '+666.6' }.to_json,
|
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,
|
'HTTP_AUTHORIZATION' => auth_token,
|
||||||
'Accept' => Mime::JSON,
|
'Accept' => Mime::JSON,
|
||||||
'Content-Type' => Mime::JSON.to_s
|
'Content-Type' => Mime::JSON.to_s
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
@contact.reload
|
@contact.reload
|
||||||
assert_equal 'new name', @contact.name
|
|
||||||
assert_equal 'new-email@coldmail.test', @contact.email
|
assert_equal 'William', @contact.name
|
||||||
assert_equal '+666.6', @contact.phone
|
assert_equal 'william@shop.test', @contact.email
|
||||||
|
assert_equal '+222.2', @contact.phone
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_notify_registrar
|
def test_notify_registrar
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue