mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Introduce custom assertion
This commit is contained in:
parent
5939da366e
commit
348e6e5d7a
54 changed files with 378 additions and 389 deletions
|
@ -1,11 +1,10 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppDomainTransferQueryTest < ApplicationIntegrationTest
|
||||
class EppDomainTransferQueryTest < EppTestCase
|
||||
def test_returns_domain_transfer_details
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
xml_doc = Nokogiri::XML(response.body)
|
||||
assert_equal '1000', xml_doc.at_css('result')[:code]
|
||||
assert_equal 1, xml_doc.css('result').size
|
||||
assert_epp_response :completed_successfully
|
||||
assert_equal 'shop.test', xml_doc.xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
assert_equal 'serverApproved', xml_doc.xpath('//domain:trStatus', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
assert_equal 'goodnames', xml_doc.xpath('//domain:reID', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
|
@ -30,13 +29,15 @@ class EppDomainTransferQueryTest < ApplicationIntegrationTest
|
|||
XML
|
||||
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_equal '2201', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
|
||||
# https://github.com/internetee/registry/issues/686
|
||||
assert_epp_response :authorization_error
|
||||
end
|
||||
|
||||
def test_no_domain_transfer
|
||||
domains(:shop).transfers.delete_all
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_equal '2303', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue