mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +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
|
@ -104,6 +104,22 @@ class APINameserversPutTest < ApplicationIntegrationTest
|
|||
JSON.parse(response.body, symbolize_names: true)
|
||||
end
|
||||
|
||||
def test_bulk_namesaervers_if_domain_update_prohibited
|
||||
domains(:shop).update!(statuses: [DomainStatus::SERVER_UPDATE_PROHIBITED])
|
||||
|
||||
params = { data: { type: 'nameserver', id: domains(:shop).nameservers.hostnames[0],
|
||||
attributes: { hostname: 'ns55.bestnames.test' } } }
|
||||
put '/repp/v1/registrar/nameservers', params: params, as: :json,
|
||||
headers: { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
|
||||
assert_response :ok
|
||||
assert_equal ({ code: 1000,
|
||||
message: 'Command completed successfully',
|
||||
data: { affected_domains: ["airport.test"],
|
||||
skipped_domains: ["shop.test"] }}),
|
||||
JSON.parse(response.body, symbolize_names: true)
|
||||
end
|
||||
|
||||
def test_unauthenticated
|
||||
put '/repp/v1/registrar/nameservers'
|
||||
assert_response 401
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue