mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
parent
cde4d00b55
commit
923d2d5446
2 changed files with 6 additions and 4 deletions
|
@ -51,7 +51,7 @@ class Registrar
|
|||
end
|
||||
end
|
||||
|
||||
if response.code == '204'
|
||||
if response.code == '200'
|
||||
flash[:notice] = t '.transferred'
|
||||
redirect_to registrar_domains_url
|
||||
else
|
||||
|
|
|
@ -7,12 +7,14 @@ class RegistrarDomainTransfersTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_batch_transfer_succeeds
|
||||
body = { data: { domainTransfers: [{ domainName: 'shop.test', transferCode: '65078d5' }] } }
|
||||
request_body = { data: { domainTransfers: [{ domainName: 'shop.test', transferCode: '65078d5' }] } }
|
||||
headers = { 'Content-type' => 'application/json' }
|
||||
request_stub = stub_request(:post, /domain_transfers/).with(body: body,
|
||||
request_stub = stub_request(:post, /domain_transfers/).with(body: request_body,
|
||||
headers: headers,
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
.to_return(status: 204)
|
||||
.to_return(body: { data: [{
|
||||
type: 'domain_transfer'
|
||||
}] }.to_json, status: 200)
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Transfer'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue