summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-04-24 16:53:03 -0700
committerJared Norman <jared@super.gd>2019-04-24 16:55:12 -0700
commitd98c103f6bc485d8398f5231bfe7917b772ec829 (patch)
tree0b95fc781ee20c3f400da27d8ffc805aff92920f /spec
parent0203766a9291ae2eca5a73c067530564e09f481d (diff)
More hacks to handle zero dollar orders
I have a plan for how to handle these better in v1.0 though!
Diffstat (limited to 'spec')
-rw-r--r--spec/super_good/solidus_taxjar/api_params_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/super_good/solidus_taxjar/api_params_spec.rb b/spec/super_good/solidus_taxjar/api_params_spec.rb
index e16edb9..daa5b63 100644
--- a/spec/super_good/solidus_taxjar/api_params_spec.rb
+++ b/spec/super_good/solidus_taxjar/api_params_spec.rb
@@ -222,6 +222,18 @@ RSpec.describe SuperGood::SolidusTaxJar::APIParams do
it "sends the sales tax total as zero" do
expect(subject[:sales_tax]).to be_zero
end
+
+ it "sends the sales tax on the line items as zero" do
+ expect(subject[:line_items]).to contain_exactly({
+ discount: 2,
+ id: line_item.id,
+ product_identifier: "G00D-PR0DUCT",
+ product_tax_code: "A_GEN_TAX",
+ quantity: 3,
+ sales_tax: 0,
+ unit_price: 10
+ })
+ end
end
context "when the line item has 0 quantity" do