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

@ -12,7 +12,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
def test_can_lock_a_not_locked_domain
post '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
@ -27,7 +27,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
def test_locking_a_domain_creates_a_version_record
assert_difference '@domain.versions.count', 1 do
post '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
end
@domain.reload
@ -39,7 +39,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
@domain.save
post '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
assert_equal(422, response.status)
@ -51,7 +51,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
assert(@domain.locked_by_registrant?)
post '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
assert_equal(422, response.status)
@ -62,7 +62,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
@domain.apply_registry_lock
delete '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
assert(response_json[:statuses].include?(DomainStatus::OK))
@ -73,7 +73,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
def test_cannot_unlock_a_not_locked_domain
delete '/api/v1/registrant/domains/2df2c1a1-8f6a-490a-81be-8bdf29866880/registry_lock',
{}, @auth_headers
headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
assert_equal(422, response.status)
@ -81,8 +81,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
end
def test_returns_404_when_domain_is_not_found
post '/api/v1/registrant/domains/random-uuid/registry_lock',
{}, @auth_headers
post '/api/v1/registrant/domains/random-uuid/registry_lock', headers: @auth_headers
response_json = JSON.parse(response.body, symbolize_names: true)
assert_equal(404, response.status)
@ -99,7 +98,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
assert_equal '1234', contact.ident
assert_equal 'US', contact.ident_country_code
post api_v1_registrant_domain_registry_lock_path(domain.uuid), nil, @auth_headers
post api_v1_registrant_domain_registry_lock_path(domain.uuid), headers: @auth_headers
assert_response :unauthorized
response_json = JSON.parse(response.body, symbolize_names: true)
@ -109,7 +108,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
def test_registrant_can_lock_a_domain
post '/api/v1/registrant/domains/1b3ee442-e8fe-4922-9492-8fcb9dccc69c/registry_lock',
{}, @auth_headers
headers: @auth_headers
assert_equal(200, response.status)
response_json = JSON.parse(response.body, symbolize_names: true)
@ -125,7 +124,7 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
assert_equal 'https://bestnames.test', @domain.registrar.website
post '/api/v1/registrant/domains/1b3ee442-e8fe-4922-9492-8fcb9dccc69c/registry_lock',
{}, @auth_headers
headers: @auth_headers
assert_equal(200, response.status)
response_json = JSON.parse(response.body, symbolize_names: true)