mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Add tests on domain transfer
This commit is contained in:
parent
933f28490d
commit
44add87fe2
3 changed files with 15 additions and 7 deletions
|
@ -31,7 +31,9 @@ module Concerns::Domain::Transferable
|
||||||
DomainStatus::PENDING_TRANSFER,
|
DomainStatus::PENDING_TRANSFER,
|
||||||
DomainStatus::FORCE_DELETE,
|
DomainStatus::FORCE_DELETE,
|
||||||
DomainStatus::SERVER_TRANSFER_PROHIBITED,
|
DomainStatus::SERVER_TRANSFER_PROHIBITED,
|
||||||
DomainStatus::CLIENT_TRANSFER_PROHIBITED
|
DomainStatus::CLIENT_TRANSFER_PROHIBITED,
|
||||||
|
DomainStatus::SERVER_UPDATE_PROHIBITED,
|
||||||
|
DomainStatus::CLIENT_UPDATE_PROHIBITED,
|
||||||
]).empty?
|
]).empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,10 @@ class APIDomainTransfersTest < ApplicationIntegrationTest
|
||||||
assert_equal ({ code: 1000,
|
assert_equal ({ code: 1000,
|
||||||
message: 'Command completed successfully',
|
message: 'Command completed successfully',
|
||||||
data: { success: [],
|
data: { success: [],
|
||||||
failed: [{ type: "domain_transfer", domain_name: "shop.test" }] }}),
|
failed: [{ type: "domain_transfer",
|
||||||
|
domain_name: "shop.test",
|
||||||
|
errors: [{:code=>"2304", :msg=>"Object status prohibits operation"}] }],
|
||||||
|
}}),
|
||||||
JSON.parse(response.body, symbolize_names: true)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,10 @@ class APINameserversPutTest < ApplicationIntegrationTest
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
assert_equal ({ code: 1000,
|
assert_equal ({ code: 1000,
|
||||||
message: 'Command completed successfully',
|
message: 'Command completed successfully',
|
||||||
data: { affected_domains: ["airport.test"],
|
data: { type: "nameserver",
|
||||||
|
id: "ns55.bestnames.test",
|
||||||
|
attributes: {hostname: "ns55.bestnames.test"},
|
||||||
|
affected_domains: ["airport.test"],
|
||||||
skipped_domains: ["shop.test"]}}),
|
skipped_domains: ["shop.test"]}}),
|
||||||
JSON.parse(response.body, symbolize_names: true)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue