mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
parent
2db401fd98
commit
0cdbd891cc
2 changed files with 7 additions and 7 deletions
|
@ -12,9 +12,9 @@ class RegistrarNameserverReplacementTest < ActionDispatch::IntegrationTest
|
|||
attributes: { hostname: 'new-ns.bestnames.test',
|
||||
ipv4: %w[192.0.2.55 192.0.2.56],
|
||||
ipv6: %w[2001:db8::55 2001:db8::56] } } }
|
||||
request_stub = stub_request(:post, /registrar\/nameservers/).with(body: request_body,
|
||||
headers: { 'Content-type' => 'application/json' },
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
request_stub = stub_request(:put, /registrar\/nameservers/).with(body: request_body,
|
||||
headers: { 'Content-type' => 'application/json' },
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
.to_return(body: { data: [{
|
||||
type: 'nameserver',
|
||||
id: 'new-ns.bestnames.test'
|
||||
|
@ -35,9 +35,9 @@ class RegistrarNameserverReplacementTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_fails_gracefully
|
||||
stub_request(:post, /registrar\/nameservers/).to_return(status: 400,
|
||||
body: { errors: [{ title: 'epic fail' }] }.to_json,
|
||||
headers: { 'Content-type' => 'application/json' })
|
||||
stub_request(:put, /registrar\/nameservers/).to_return(status: 400,
|
||||
body: { errors: [{ title: 'epic fail' }] }.to_json,
|
||||
headers: { 'Content-type' => 'application/json' })
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Replace nameserver'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue