Upgrade to Rails 5.0

Closes #377
This commit is contained in:
Artur Beljajev 2019-09-15 15:38:52 +03:00
parent bb108efedd
commit fa52001be6
141 changed files with 1388 additions and 1664 deletions

View file

@ -39,7 +39,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -73,7 +74,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -106,7 +108,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -139,7 +142,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
end
refute Domain.where(name: @idn_auction.domain).exists?
@ -176,7 +180,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
end
@idn_auction.reload
@ -212,7 +217,8 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames'}
end
@idn_auction.reload

View file

@ -31,7 +31,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :completed_successfully
end
@ -68,7 +69,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :completed_successfully
end
@ -100,7 +102,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
@auction.reload
@ -132,7 +135,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :required_parameter_missing
end
@ -164,7 +168,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :invalid_authorization_information
end
@ -195,7 +200,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :required_parameter_missing
end
@ -222,7 +228,8 @@ class EppDomainCreateAuctionTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :parameter_value_policy_error
end

View file

@ -28,7 +28,8 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :completed_successfully
@ -71,7 +72,8 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :completed_successfully
@ -105,7 +107,8 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
assert_epp_response :completed_successfully
assert_equal transfer_code, Domain.find_by(name: name).transfer_code
@ -135,7 +138,8 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :data_management_policy_violation
end
@ -164,7 +168,8 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :invalid_authorization_information
end
@ -192,7 +197,8 @@ class EppDomainCreateBaseTest < EppTestCase
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :required_parameter_missing
end
@ -220,7 +226,8 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => "session=#{session.session_id}" }
end
assert_epp_response :billing_failure
end
@ -248,7 +255,8 @@ class EppDomainCreateBaseTest < EppTestCase
</epp>
XML
assert_no_difference 'Domain.count' do
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :billing_failure
end