mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 04:07:33 +02:00
22 lines
No EOL
610 B
Ruby
22 lines
No EOL
610 B
Ruby
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'
|
|
|
|
registry = Registry.current
|
|
assert_equal 20, registry.vat_rate
|
|
assert_equal Country.new(:us), registry.vat_country
|
|
end
|
|
end |