mirror of
https://github.com/internetee/registry.git
synced 2025-06-09 06:04:56 +02:00
parent
59ceb9c51a
commit
443485d5d6
4 changed files with 8 additions and 2 deletions
|
@ -28,6 +28,8 @@ class EppDomainCreateTransferCodeTest < ActionDispatch::IntegrationTest
|
|||
|
||||
post '/epp/command/create', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
refute_empty Domain.find_by(name: 'brandnew.test').transfer_code
|
||||
assert_equal '1000', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
assert_equal 1, Nokogiri::XML(response.body).css('result').size
|
||||
end
|
||||
|
||||
def test_honors_custom
|
||||
|
@ -56,5 +58,7 @@ class EppDomainCreateTransferCodeTest < ActionDispatch::IntegrationTest
|
|||
|
||||
post '/epp/command/create', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_equal '1058ad73', Domain.find_by(name: 'brandnew.test').transfer_code
|
||||
assert_equal '1000', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
assert_equal 1, Nokogiri::XML(response.body).css('result').size
|
||||
end
|
||||
end
|
||||
|
|
|
@ -44,6 +44,6 @@ class EppDomainTransferTest < ActionDispatch::IntegrationTest
|
|||
XML
|
||||
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
assert Nokogiri::XML(response.body).at_css('result[code="2303"]')
|
||||
assert_equal '2303', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,6 @@ class EppDomainTransferTransferCodeTest < ActionDispatch::IntegrationTest
|
|||
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
refute_equal registrars(:goodnames), domains(:shop).registrar
|
||||
assert Nokogiri::XML(response.body).at_css('result[code="2201"]')
|
||||
assert_equal '2201', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,5 +22,7 @@ class EppDomainUpdateTest < ActionDispatch::IntegrationTest
|
|||
|
||||
post '/epp/command/update', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_equal 'f0ff7d17b0', domains(:shop).transfer_code
|
||||
assert_equal '1000', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
assert_equal 1, Nokogiri::XML(response.body).css('result').size
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue