Improve/fix tests

#707
This commit is contained in:
Artur Beljajev 2018-02-15 22:07:10 +02:00
parent 81ea57c523
commit de6e640f86
3 changed files with 3 additions and 0 deletions

View file

@ -31,5 +31,6 @@ library:
invalid: invalid:
name: invalid.test name: invalid.test
transfer_code: any transfer_code: any
valid_to: 2010-07-05
registrar: bestnames registrar: bestnames
registrant: invalid registrant: invalid

View file

@ -21,6 +21,7 @@ class EppDomainDeleteTest < ActionDispatch::IntegrationTest
XML XML
post '/epp/command/delete', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' } post '/epp/command/delete', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
assert_includes Domain.find_by(name: 'invalid.test').statuses, DomainStatus::PENDING_DELETE_CONFIRMATION
assert_equal '1001', Nokogiri::XML(response.body).at_css('result')[:code] assert_equal '1001', Nokogiri::XML(response.body).at_css('result')[:code]
assert_equal 1, Nokogiri::XML(response.body).css('result').size assert_equal 1, Nokogiri::XML(response.body).css('result').size
end end

View file

@ -9,6 +9,7 @@ class RegistrarDomainsTest < ActionDispatch::IntegrationTest
Domain,Transfer code,Registrant name,Registrant code,Date of expiry Domain,Transfer code,Registrant name,Registrant code,Date of expiry
library.test,45118f5,Acme Ltd,acme-ltd-001,2010-07-05 library.test,45118f5,Acme Ltd,acme-ltd-001,2010-07-05
shop.test,65078d5,John,john-001,2010-07-05 shop.test,65078d5,John,john-001,2010-07-05
invalid.test,any,any,any,2010-07-05
airport.test,55438j5,John,john-001,2010-07-05 airport.test,55438j5,John,john-001,2010-07-05
CSV CSV