summaryrefslogtreecommitdiff
path: root/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/super_good/solidus_taxjar/tax_calculator_spec.rb')
-rw-r--r--spec/super_good/solidus_taxjar/tax_calculator_spec.rb14
1 files changed, 14 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 e5c0a01..f7a7929 100644
--- a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
+++ b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
@@ -173,6 +173,20 @@ RSpec.describe ::SuperGood::SolidusTaxJar::TaxCalculator do
end
end
+ context "but the taxable address check returns false" do
+ before do
+ allow(SuperGood::SolidusTaxJar.taxable_address_check)
+ .to receive(:call).with(address)
+ .and_return(false)
+ end
+
+ 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
+
context "when there are shipping taxes" do
let(:shipping_tax_breakdown) do
instance_double ::Taxjar::Shipping, tax_collectable: 10.00