Clean up settings after tests

This commit is contained in:
Artur Beljajev 2019-10-09 15:52:20 +03:00
parent 840f1db5c9
commit 7fcab05e51
15 changed files with 74 additions and 22 deletions

View file

@ -1,6 +1,16 @@
require 'test_helper'
class RegistryTest < ActiveSupport::TestCase
setup do
@original_registry_vat_rate = Setting.registry_vat_prc
@original_registry_country_code = Setting.registry_country_code
end
teardown do
Setting.registry_vat_prc = @original_registry_vat_rate
Setting.registry_country_code = @original_registry_country_code
end
def test_returns_current_registry
Setting.registry_vat_prc = 0.2
Setting.registry_country_code = 'US'