Remove global setting for tests

#623
This commit is contained in:
Artur Beljajev 2018-04-12 17:27:39 +03:00
parent 7ffc62e370
commit a8046ce9cf
2 changed files with 7 additions and 1 deletions

View file

@ -3,6 +3,12 @@ require 'test_helper'
class AdminAreaNewRegistrarTest < ActionDispatch::IntegrationTest
setup do
login_as users(:admin)
@original_registry_country_code = Setting.registry_country_code
Setting.registry_country_code = 'DE'
end
teardown do
Setting.registry_country_code = @original_registry_country_code
end
def test_new_registrar_creation_with_required_params
@ -12,6 +18,7 @@ class AdminAreaNewRegistrarTest < ActionDispatch::IntegrationTest
fill_in 'Name', with: 'Brand new names'
fill_in 'Reg no', with: '55555555'
fill_in 'Contact e-mail', with: 'test@example.com'
select 'Germany', from: 'Country'
fill_in 'Accounting customer code', with: 'test'
fill_in 'Code', with: 'test'

View file

@ -14,7 +14,6 @@ require 'webmock/minitest'
require 'support/rails5_assetions' # Remove once upgraded to Rails 5
Setting.address_processing = false
Setting.registry_country_code = 'US'
class ActiveSupport::TestCase
include FactoryBot::Syntax::Methods