Improve tests

#694
This commit is contained in:
Artur Beljajev 2018-02-19 03:04:55 +02:00
parent 8606cf7b48
commit 6a7effac50
2 changed files with 6 additions and 0 deletions

View file

@ -46,6 +46,9 @@ class APIDomainTransfersTest < ActionDispatch::IntegrationTest
assert_difference -> { @old_registrar.messages.count } do assert_difference -> { @old_registrar.messages.count } do
post '/repp/v1/domain_transfers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key } post '/repp/v1/domain_transfers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key }
end end
message = 'Domain transfer was approved, associated contacts were: ["jane-001", "william-001"] and registrant was john-001'
assert_equal message, @old_registrar.messages.last.body
end end
def test_duplicates_registrant_admin_and_tech_contacts def test_duplicates_registrant_admin_and_tech_contacts

View file

@ -45,6 +45,9 @@ class EppDomainTransferRequestTest < ActionDispatch::IntegrationTest
assert_difference -> { @old_registrar.messages.count } do assert_difference -> { @old_registrar.messages.count } do
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' } post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_goodnames' }
end end
message = 'Domain transfer was approved, associated contacts were: ["jane-001", "william-001"] and registrant was john-001'
assert_equal message, @old_registrar.messages.last.body
end end
def test_duplicates_registrant_admin_and_tech_contacts def test_duplicates_registrant_admin_and_tech_contacts