mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Test changing publishable field on registrant API
This commit is contained in:
parent
5c129b24ef
commit
4286a6bab7
3 changed files with 17 additions and 2 deletions
|
@ -229,6 +229,21 @@ class RegistrantApiV1ContactUpdateTest < ActionDispatch::IntegrationTest
|
|||
assert_equal %w[phone], @contact.disclosed_attributes
|
||||
end
|
||||
|
||||
def test_publishable_change_when_present
|
||||
@contact = contacts(:acme_ltd)
|
||||
@contact.update!(publishable: false)
|
||||
|
||||
patch api_v1_registrant_contact_path(@contact.uuid),
|
||||
params: { disclosed_attributes: %w[], publishable: true },
|
||||
as: :json,
|
||||
headers: { 'HTTP_AUTHORIZATION' => auth_token }
|
||||
@contact.reload
|
||||
|
||||
assert_response :ok
|
||||
assert @contact.publishable
|
||||
end
|
||||
|
||||
|
||||
def test_return_contact_details
|
||||
patch api_v1_registrant_contact_path(@contact.uuid), params: { name: 'new name' },
|
||||
as: :json,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue