mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
parent
bb108efedd
commit
fa52001be6
141 changed files with 1388 additions and 1664 deletions
|
@ -31,7 +31,7 @@ class RegistrantAreaContactUpdateTest < ApplicationIntegrationTest
|
|||
stub_auth_request
|
||||
|
||||
request_body = { name: 'new name', email: 'new@inbox.test', phone: '+666.6' }.to_json
|
||||
headers = { 'Content-Type' => Mime::JSON,
|
||||
headers = { 'Content-Type' => Mime[:json],
|
||||
'Authorization' => 'Bearer test-access-token' }
|
||||
url = "https://api.test/api/v1/registrant/contacts/#{@contact.uuid}"
|
||||
update_request_stub = stub_request(:patch, url).with(body: request_body, headers: headers)
|
||||
|
@ -115,7 +115,7 @@ class RegistrantAreaContactUpdateTest < ApplicationIntegrationTest
|
|||
country_code: 'AT',
|
||||
state: 'new state',
|
||||
} }.to_json
|
||||
headers = { 'Content-type' => 'application/json',
|
||||
headers = { 'Content-type' => Mime[:json],
|
||||
'Authorization' => 'Bearer test-access-token' }
|
||||
url = "https://api.test/api/v1/registrant/contacts/#{@contact.uuid}"
|
||||
update_request_stub = stub_request(:patch, url).with(body: request_body, headers: headers)
|
||||
|
@ -174,7 +174,7 @@ class RegistrantAreaContactUpdateTest < ApplicationIntegrationTest
|
|||
body = { ident: '1234', first_name: 'Registrant', last_name: 'User' }
|
||||
stub_request(:post, 'https://api.test/api/v1/registrant/auth/eid').with(body: body)
|
||||
.to_return(body: { access_token: 'test-access-token' }.to_json,
|
||||
headers: { 'Content-type' => 'application/json' },
|
||||
headers: { 'Content-type' => Mime[:json] },
|
||||
status: 200)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class RegistrarAreaBulkTransferTest < ApplicationSystemTestCase
|
|||
|
||||
def test_transfer_multiple_domains_in_bulk
|
||||
request_body = { data: { domainTransfers: [{ domainName: 'shop.test', transferCode: '65078d5' }] } }
|
||||
headers = { 'Content-type' => 'application/json' }
|
||||
headers = { 'Content-type' => Mime[:json] }
|
||||
request_stub = stub_request(:post, /domain_transfers/).with(body: request_body,
|
||||
headers: headers,
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
|
@ -28,7 +28,7 @@ class RegistrarAreaBulkTransferTest < ApplicationSystemTestCase
|
|||
|
||||
def test_fail_gracefully
|
||||
body = { errors: [{ title: 'epic fail' }] }.to_json
|
||||
headers = { 'Content-type' => 'application/json' }
|
||||
headers = { 'Content-type' => Mime[:json] }
|
||||
stub_request(:post, /domain_transfers/).to_return(status: 400, body: body, headers: headers)
|
||||
|
||||
visit registrar_domains_url
|
||||
|
|
|
@ -12,7 +12,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase
|
|||
ipv4: %w[192.0.2.55 192.0.2.56],
|
||||
ipv6: %w[2001:db8::55 2001:db8::56] } } }
|
||||
request_stub = stub_request(:put, /registrar\/nameservers/).with(body: request_body,
|
||||
headers: { 'Content-type' => 'application/json' },
|
||||
headers: { 'Content-type' => Mime[:json] },
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
.to_return(body: { data: [{
|
||||
type: 'nameserver',
|
||||
|
@ -38,7 +38,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase
|
|||
def test_fails_gracefully
|
||||
stub_request(:put, /registrar\/nameservers/).to_return(status: 400,
|
||||
body: { errors: [{ title: 'epic fail' }] }.to_json,
|
||||
headers: { 'Content-type' => 'application/json' })
|
||||
headers: { 'Content-type' => Mime[:json] })
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Bulk change'
|
||||
|
|
|
@ -31,7 +31,7 @@ class RegistrarAreaTechContactBulkChangeTest < ApplicationSystemTestCase
|
|||
stub_request(:patch, /domains\/contacts/)
|
||||
.to_return(status: 400,
|
||||
body: { error: { message: 'epic fail' } }.to_json,
|
||||
headers: { 'Content-type' => 'application/json' })
|
||||
headers: { 'Content-type' => Mime[:json] })
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Bulk change'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue