mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
parent
bb108efedd
commit
fa52001be6
141 changed files with 1388 additions and 1664 deletions
|
@ -14,7 +14,8 @@ class EppDomainBaseTest < EppTestCase
|
|||
</command>
|
||||
</epp>
|
||||
XML
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_info_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
|
|
@ -28,7 +28,8 @@ class EppDomainCheckAuctionTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -52,7 +53,8 @@ class EppDomainCheckAuctionTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -76,7 +78,8 @@ class EppDomainCheckAuctionTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -100,7 +103,8 @@ class EppDomainCheckAuctionTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -124,7 +128,8 @@ class EppDomainCheckAuctionTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
|
|
@ -15,7 +15,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -36,7 +37,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -59,7 +61,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -80,7 +83,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -103,7 +107,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -126,7 +131,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -149,7 +155,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd')['avail']
|
||||
|
@ -172,7 +179,8 @@ class EppDomainCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal 3, response_xml.xpath('//domain:cd', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').size
|
||||
|
|
|
@ -39,7 +39,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
|
||||
refute Domain.where(name: @idn_auction.domain).exists?
|
||||
|
@ -73,7 +74,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
|
||||
end
|
||||
|
||||
refute Domain.where(name: @idn_auction.domain).exists?
|
||||
|
@ -106,7 +108,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
|
||||
end
|
||||
|
||||
refute Domain.where(name: @idn_auction.domain).exists?
|
||||
|
@ -139,7 +142,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
|
||||
end
|
||||
|
||||
refute Domain.where(name: @idn_auction.domain).exists?
|
||||
|
@ -176,7 +180,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
|
||||
end
|
||||
|
||||
@idn_auction.reload
|
||||
|
@ -212,7 +217,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
|
||||
end
|
||||
|
||||
@idn_auction.reload
|
||||
|
|
|
@ -31,7 +31,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
@ -68,7 +69,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
@ -100,7 +102,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
|
||||
@auction.reload
|
||||
|
@ -132,7 +135,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :required_parameter_missing
|
||||
end
|
||||
|
@ -164,7 +168,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :invalid_authorization_information
|
||||
end
|
||||
|
@ -195,7 +200,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :required_parameter_missing
|
||||
end
|
||||
|
@ -222,7 +228,8 @@ class EppDomainCreateAuctionTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :parameter_value_policy_error
|
||||
end
|
||||
|
|
|
@ -28,7 +28,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -71,7 +72,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :completed_successfully
|
||||
|
||||
|
@ -105,7 +107,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
assert_equal transfer_code, Domain.find_by(name: name).transfer_code
|
||||
|
@ -135,7 +138,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :data_management_policy_violation
|
||||
end
|
||||
|
@ -164,7 +168,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :invalid_authorization_information
|
||||
end
|
||||
|
@ -192,7 +197,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :required_parameter_missing
|
||||
end
|
||||
|
@ -220,7 +226,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => "session=#{session.session_id}" }
|
||||
end
|
||||
assert_epp_response :billing_failure
|
||||
end
|
||||
|
@ -248,7 +255,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :billing_failure
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_includes Domain.find_by(name: 'invalid.test').statuses, DomainStatus::PENDING_DELETE_CONFIRMATION
|
||||
assert_epp_response :completed_successfully_action_pending
|
||||
end
|
||||
|
@ -62,7 +62,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :object_status_prohibits_operation
|
||||
end
|
||||
|
@ -89,7 +89,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert @domain.registrant_verification_asked?
|
||||
|
@ -120,7 +120,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_not @domain.registrant_verification_asked?
|
||||
|
@ -151,7 +151,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_not @domain.registrant_verification_asked?
|
||||
|
@ -176,7 +176,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :required_parameter_missing
|
||||
end
|
||||
|
@ -203,7 +203,7 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, params: { frame: request_xml }, headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :object_status_prohibits_operation
|
||||
end
|
||||
|
|
|
@ -21,7 +21,8 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_info_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -49,7 +50,8 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_info_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '65078d5', response_xml.at_xpath('//domain:authInfo/domain:pw', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
|
@ -76,7 +78,8 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_goodnames'
|
||||
post epp_info_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '65078d5', response_xml.at_xpath('//domain:authInfo/domain:pw', 'domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
|
@ -99,7 +102,8 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_goodnames'
|
||||
post epp_info_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_nil response_xml.at_xpath('//domain:authInfo/domain:pw',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppDomainRenewBaseTest < EppTestCase
|
||||
self.use_transactional_fixtures = false
|
||||
self.use_transactional_tests = false
|
||||
|
||||
def test_renews_domain
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
@ -24,7 +24,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_renew_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -50,7 +51,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_changes -> { domain.valid_to } do
|
||||
post epp_renew_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
domain.reload
|
||||
end
|
||||
assert_epp_response :object_status_prohibits_operation
|
||||
|
@ -77,8 +79,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_changes -> { domain.valid_to } do
|
||||
post epp_renew_path, { frame: request_xml },
|
||||
'HTTP_COOKIE' => "session=#{session.session_id}"
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => "session=#{session.session_id}" }
|
||||
domain.reload
|
||||
end
|
||||
assert_epp_response :authorization_error
|
||||
|
@ -105,8 +107,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference -> { domain.valid_to } do
|
||||
post epp_renew_path, { frame: request_xml }, 'HTTP_COOKIE' =>
|
||||
"session=#{session.session_id}"
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => "session=#{session.session_id}" }
|
||||
domain.reload
|
||||
end
|
||||
assert_epp_response :billing_failure
|
||||
|
@ -132,7 +134,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_changes -> { domain.valid_to } do
|
||||
post epp_renew_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
domain.reload
|
||||
end
|
||||
assert_epp_response :billing_failure
|
||||
|
@ -158,7 +161,8 @@ class EppDomainRenewBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_changes -> { domain.valid_to } do
|
||||
post epp_renew_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_renew_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
domain.reload
|
||||
end
|
||||
assert_epp_response :parameter_value_policy_error
|
||||
|
|
|
@ -2,7 +2,8 @@ require 'test_helper'
|
|||
|
||||
class EppDomainTransferQueryTest < EppTestCase
|
||||
def test_returns_domain_transfer_details
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
xml_doc = Nokogiri::XML(response.body)
|
||||
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
|
||||
|
@ -28,14 +29,16 @@ class EppDomainTransferQueryTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :invalid_authorization_information
|
||||
end
|
||||
|
||||
def test_no_domain_transfer
|
||||
domains(:shop).transfers.delete_all
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
||||
|
|
|
@ -13,24 +13,28 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
end
|
||||
|
||||
def test_transfers_domain_at_once
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
||||
def test_creates_new_domain_transfer
|
||||
assert_difference -> { @domain.transfers.size } do
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
end
|
||||
end
|
||||
|
||||
def test_approves_automatically_if_auto_approval_is_enabled
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
assert_equal 'serverApproved', Nokogiri::XML(response.body).xpath('//domain:trStatus', 'domain' =>
|
||||
'https://epp.tld.ee/schema/domain-eis-1.0.xsd').text
|
||||
end
|
||||
|
||||
def test_assigns_new_registrar
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
@domain.reload
|
||||
assert_equal @new_registrar, @domain.registrar
|
||||
end
|
||||
|
@ -38,7 +42,8 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
def test_regenerates_transfer_code
|
||||
@old_transfer_code = @domain.transfer_code
|
||||
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
|
||||
@domain.reload
|
||||
refute_equal @domain.transfer_code, @old_transfer_code
|
||||
|
@ -48,31 +53,36 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
@old_registrar = @domain.registrar
|
||||
|
||||
assert_difference -> { @old_registrar.notifications.count } do
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
end
|
||||
end
|
||||
|
||||
def test_duplicates_registrant_admin_and_tech_contacts
|
||||
assert_difference -> { @new_registrar.contacts.size }, 3 do
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
end
|
||||
end
|
||||
|
||||
def test_reuses_identical_contact
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
assert_equal 1, @new_registrar.contacts.where(name: 'William').size
|
||||
end
|
||||
|
||||
def test_saves_legal_document
|
||||
assert_difference -> { @domain.legal_documents(true).size } do
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
assert_difference -> { @domain.legal_documents.reload.size } do
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
end
|
||||
end
|
||||
|
||||
def test_non_transferable_domain
|
||||
@domain.update!(statuses: [DomainStatus::SERVER_TRANSFER_PROHIBITED])
|
||||
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
domains(:shop).reload
|
||||
|
||||
assert_equal registrars(:bestnames), domains(:shop).registrar
|
||||
|
@ -82,7 +92,8 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
def test_discarded_domain_cannot_be_transferred
|
||||
@domain.update!(statuses: [DomainStatus::DELETE_CANDIDATE])
|
||||
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_equal registrars(:bestnames), @domain.registrar
|
||||
|
@ -91,7 +102,8 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
|
||||
def test_same_registrar
|
||||
assert_no_difference -> { @domain.transfers.size } do
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
assert_epp_response :use_error
|
||||
end
|
||||
|
@ -113,7 +125,8 @@ class EppDomainTransferRequestTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_transfer_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
post epp_transfer_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :invalid_authorization_information
|
||||
|
|
|
@ -34,7 +34,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
assert_equal 'f0ff7d17b0', @domain.transfer_code
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -56,7 +57,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_epp_response :object_status_prohibits_operation
|
||||
end
|
||||
|
||||
|
@ -76,7 +78,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
|
||||
assert_epp_response :object_status_prohibits_operation
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
|
@ -109,7 +112,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully_action_pending
|
||||
|
@ -145,7 +149,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully_action_pending
|
||||
|
@ -179,7 +184,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -214,7 +220,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -250,7 +257,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -287,7 +295,8 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue