diff options
author | Jared Norman <jared@super.gd> | 2019-02-05 10:51:08 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-02-05 10:51:08 -0800 |
commit | 4f7bd65748a251e881cfdf54bab1b7513ada24da (patch) | |
tree | ca92088e25a3894e0aa29d1f09c9ace979d1db80 /spec | |
parent | a238148b1d66b9d5377b9c840b00b9e2ea4d4d7e (diff) |
Introduce configurable taxable address checkv0.5.0
Diffstat (limited to 'spec')
-rw-r--r-- | spec/super_good/solidus_taxjar/tax_calculator_spec.rb | 14 |
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 |