Improve test

#694
This commit is contained in:
Artur Beljajev 2018-02-17 02:48:45 +02:00
parent 59ceb9c51a
commit 443485d5d6
4 changed files with 8 additions and 2 deletions

View file

@ -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