mirror of
https://github.com/internetee/registry.git
synced 2025-08-20 00:14:05 +02:00
Added test for bulk transfer and bulk nameservers
This commit is contained in:
parent
9a1ab5772e
commit
218bc436e6
2 changed files with 30 additions and 0 deletions
|
|
@ -63,6 +63,20 @@ class APIDomainTransfersTest < ApplicationIntegrationTest
|
|||
assert_equal 1, @new_registrar.contacts.where(name: 'William').size
|
||||
end
|
||||
|
||||
def test_bulk_transfer_if_domain_has_update_prohibited_status
|
||||
domains(:shop).update!(statuses: [DomainStatus::SERVER_UPDATE_PROHIBITED])
|
||||
|
||||
post '/repp/v1/domains/transfer', params: request_params, as: :json,
|
||||
headers: { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
|
||||
assert_response :ok
|
||||
assert_equal ({ code: 1000,
|
||||
message: 'Command completed successfully',
|
||||
data: { success: [],
|
||||
failed: [{ type: "domain_transfer", domain_name: "shop.test" }] }}),
|
||||
JSON.parse(response.body, symbolize_names: true)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def request_params
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue