summaryrefslogtreecommitdiff
path: root/spec/super_good
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-01-28 10:52:23 -0800
committerJared Norman <jared@super.gd>2019-01-28 10:52:23 -0800
commitc5834b26aae6cab5770b949b22bb11a685506ba5 (patch)
treedcf1603e46d1277cb0aa480c917e303241d6d27d /spec/super_good
parentc1bf02cf6586b537535956a98c3864d05ecdecc6 (diff)
Add test mode for disabling calculator
Diffstat (limited to 'spec/super_good')
-rw-r--r--spec/super_good/solidus_taxjar/tax_calculator_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
index b537bfc..84f9664 100644
--- a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
+++ b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
@@ -203,6 +203,17 @@ RSpec.describe ::SuperGood::SolidusTaxJar::TaxCalculator do
end
end
end
+
+ context "when test_mode is set" do
+ before { SuperGood::SolidusTaxJar.test_mode = true }
+ after { SuperGood::SolidusTaxJar.test_mode = false }
+
+ it "returns no taxes" do
+ expect(subject.order_id).to eq order.id
+ expect(subject.shipment_taxes).to be_empty
+ expect(subject.line_item_taxes).to be_empty
+ end
+ end
end
context "and there is not a breakdown" do