Improve tests

#694
This commit is contained in:
Artur Beljajev 2018-02-19 02:14:13 +02:00
parent 4ada9d1bd0
commit 36f65a267c
3 changed files with 51 additions and 43 deletions

View file

@ -24,29 +24,6 @@ class EppDomainTransferBaseTest < ActionDispatch::IntegrationTest
assert_equal '2304', Nokogiri::XML(response.body).at_css('result')[:code]
end
def test_wrong_transfer_code
request_xml = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<command>
<transfer op="query">
<domain:transfer xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
<domain:name>shop.test</domain:name>
<domain:authInfo>
<domain:pw>wrong</domain:pw>
</domain:authInfo>
</domain:transfer>
</transfer>
</command>
</epp>
XML
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
domains(:shop).reload
assert_equal registrars(:bestnames), domains(:shop).registrar
assert_equal '2201', Nokogiri::XML(response.body).at_css('result')[:code]
end
def test_non_existent_domain
request_xml = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>