summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-03-19 12:49:03 -0700
committerJared Norman <jared@super.gd>2019-03-19 12:49:03 -0700
commit0d3d8783755d18c0d6ebfc95f3109b518e7e1b07 (patch)
treea786b218ddf0b3147876c329ddb1f96f07e19254 /spec
parentf5f234e82ab8f2cc5044c9299e8894ff9dcbbf8d (diff)
Report full line item list for transactions
This sends the full list of line items in the order with their SKUs and tax codes when creating/updating transactions in TaxJar.
Diffstat (limited to 'spec')
-rw-r--r--spec/super_good/solidus_taxjar/api_params_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/super_good/solidus_taxjar/api_params_spec.rb b/spec/super_good/solidus_taxjar/api_params_spec.rb
index 8b0e9d0..abc8a23 100644
--- a/spec/super_good/solidus_taxjar/api_params_spec.rb
+++ b/spec/super_good/solidus_taxjar/api_params_spec.rb
@@ -64,12 +64,14 @@ RSpec.describe SuperGood::SolidusTaxJar::APIParams do
variant: variant,
price: 10,
quantity: 3,
- promo_total: -2
+ promo_total: -2,
+ additional_tax_total: 4
)
end
let(:variant) do
Spree::Variant.create!(
+ sku: "G00D-PR0DUCT",
product: product,
price: 10
)
@@ -171,6 +173,15 @@ RSpec.describe SuperGood::SolidusTaxJar::APIParams do
to_zip: "90210",
transaction_date: "2018-03-06T12:10:33Z",
transaction_id: "R111222333",
+ line_items: [{
+ id: line_item.id,
+ quantity: 3,
+ product_identifier: "G00D-PR0DUCT",
+ product_tax_code: "A_GEN_TAX",
+ unit_price: 10,
+ discount: 2,
+ sales_tax: 4
+ }]
})
end
end