Improve tests

#694
This commit is contained in:
Artur Beljajev 2018-02-18 05:08:28 +02:00
parent e84a1dc0de
commit 4ab6821d8a
9 changed files with 236 additions and 78 deletions

View file

@ -0,0 +1,24 @@
require 'test_helper'
class EppDomainTransferBaseTest < ActionDispatch::IntegrationTest
def test_non_existent_domain
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="request">
<domain:transfer xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
<domain:name>non-existent.test</domain:name>
<domain:authInfo>
<domain:pw>any</domain:pw>
</domain:authInfo>
</domain:transfer>
</transfer>
</command>
</epp>
XML
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
assert_equal '2303', Nokogiri::XML(response.body).at_css('result')[:code]
end
end