mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Merge branch 'master' into registry-791
# Conflicts: # db/structure.sql
This commit is contained in:
commit
106592e53e
58 changed files with 991 additions and 1005 deletions
|
@ -41,11 +41,12 @@ class APINameserversPutTest < ActionDispatch::IntegrationTest
|
|||
assert_equal nameserver_hash, nameservers(:metro_ns1).reload.attributes
|
||||
end
|
||||
|
||||
def test_returns_new_nameserver_record
|
||||
def test_returns_new_nameserver_record_and_affected_domain
|
||||
request_params = { format: :json, data: { type: 'nameserver', id: 'ns1.bestnames.test',
|
||||
attributes: { hostname: 'ns55.bestnames.test',
|
||||
ipv4: ['192.0.2.55'],
|
||||
ipv6: ['2001:db8::55'] } } }
|
||||
|
||||
put '/repp/v1/registrar/nameservers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
|
||||
assert_response 200
|
||||
|
@ -53,7 +54,8 @@ class APINameserversPutTest < ActionDispatch::IntegrationTest
|
|||
id: 'ns55.bestnames.test',
|
||||
attributes: { hostname: 'ns55.bestnames.test',
|
||||
ipv4: ['192.0.2.55'],
|
||||
ipv6: ['2001:db8::55'] } } }),
|
||||
ipv6: ['2001:db8::55'] }},
|
||||
affected_domains: ["airport.test", "shop.test"] }),
|
||||
JSON.parse(response.body, symbolize_names: true)
|
||||
end
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ class RegistrarAreaNameserverBulkChangeTest < ActionDispatch::IntegrationTest
|
|||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
.to_return(body: { data: [{
|
||||
type: 'nameserver',
|
||||
id: 'new-ns.bestnames.test'
|
||||
}] }.to_json, status: 200)
|
||||
id: 'new-ns.bestnames.test'}],
|
||||
affected_domains: ["airport.test", "shop.test"]}.to_json, status: 200)
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Bulk change'
|
||||
|
@ -32,6 +32,7 @@ class RegistrarAreaNameserverBulkChangeTest < ActionDispatch::IntegrationTest
|
|||
assert_requested request_stub
|
||||
assert_current_path registrar_domains_path
|
||||
assert_text 'Nameserver have been successfully replaced'
|
||||
assert_text 'Affected domains: airport.test, shop.test'
|
||||
end
|
||||
|
||||
def test_fails_gracefully
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue