From a25594a8b5e28bbd069d42d3c1120b6aa5ffedbd Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Tue, 5 Jun 2018 09:21:29 +0300 Subject: [PATCH 1/3] Add vat_rate to registrar factory --- spec/factories/registrar.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/factories/registrar.rb b/spec/factories/registrar.rb index ab46553a0..4e02317af 100644 --- a/spec/factories/registrar.rb +++ b/spec/factories/registrar.rb @@ -10,6 +10,7 @@ FactoryBot.define do email 'test@test.com' country_code 'EE' accounting_customer_code 'test' + vat_rate 5 factory :registrar_with_unlimited_balance do after :create do |registrar| From 25d6d5f4e91412b416b4c9d9571fe6cb4b7dce22 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Tue, 5 Jun 2018 09:38:25 +0300 Subject: [PATCH 2/3] Change registrar country code in factories --- spec/factories/registrar.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/factories/registrar.rb b/spec/factories/registrar.rb index 4e02317af..3b2a3e730 100644 --- a/spec/factories/registrar.rb +++ b/spec/factories/registrar.rb @@ -8,9 +8,8 @@ FactoryBot.define do state 'test' zip 'test' email 'test@test.com' - country_code 'EE' + country_code 'US' accounting_customer_code 'test' - vat_rate 5 factory :registrar_with_unlimited_balance do after :create do |registrar| From 99375354d0bb415e0607cfe2da7441cd662552e3 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Tue, 5 Jun 2018 09:51:28 +0300 Subject: [PATCH 3/3] Hard-code the country_code, as we do in test_helper --- spec/rails_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index f4dcd9cb3..6dded4f13 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -20,6 +20,7 @@ require 'support/paper_trail' require 'support/settings' ActiveRecord::Migration.maintain_test_schema! +Setting.registry_country_code = 'US' RSpec.configure do |config| config.include ActionView::TestCase::Behavior, type: :presenter