List EPP routes explicitly

This commit is contained in:
Artur Beljajev 2019-10-01 15:21:08 +03:00
parent ddaf9c9cbf
commit cb3bf7ffdc
26 changed files with 145 additions and 120 deletions

View file

@ -39,7 +39,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -73,7 +73,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -106,7 +106,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -139,7 +139,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -176,7 +176,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
@idn_auction.reload
@ -212,7 +212,7 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
@idn_auction.reload

View file

@ -31,7 +31,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :completed_successfully
end
@ -68,7 +68,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :completed_successfully
end
@ -100,7 +100,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
@auction.reload
@ -132,7 +132,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :required_parameter_missing
end
@ -164,7 +164,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :invalid_authorization_information
end
@ -195,7 +195,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :required_parameter_missing
end
@ -222,7 +222,7 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :parameter_value_policy_error
end

View file

@ -27,7 +27,7 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :completed_successfully
@ -68,7 +68,7 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :completed_successfully
@ -102,7 +102,7 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
assert_epp_response :completed_successfully
assert_equal transfer_code, Domain.find_by(name: name).transfer_code
@ -132,7 +132,7 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :data_management_policy_violation
end
@ -161,7 +161,7 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :invalid_authorization_information
end
@ -189,7 +189,7 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :required_parameter_missing
end
@ -217,7 +217,7 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
end
assert_epp_response :billing_failure
end
@ -245,7 +245,7 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
assert_no_difference 'Domain.count' do
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :billing_failure
end