summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/super_good/solidus_taxjar/tax_calculator_spec.rb4
-rw-r--r--spec/super_good/solidus_taxjar_spec.rb3
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
index 1899443..a13f564 100644
--- a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
+++ b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe ::SuperGood::SolidusTaxJar::TaxCalculator do
)
end
- let(:line_items) { [::Spree::LineItem.new] }
+ let(:line_items) { [::Spree::LineItem.new(id: 33)] }
let(:boring_shipment) do
::Spree::Shipment.new(id: 1, cost: 7)
@@ -178,7 +178,7 @@ RSpec.describe ::SuperGood::SolidusTaxJar::TaxCalculator do
before do
allow(SuperGood::SolidusTaxJar.line_item_tax_label_maker)
.to receive(:call)
- .with(taxjar_line_item)
+ .with(taxjar_line_item, line_items.first)
.and_return("Space Tax")
end
diff --git a/spec/super_good/solidus_taxjar_spec.rb b/spec/super_good/solidus_taxjar_spec.rb
index 957e2e3..dafc4fb 100644
--- a/spec/super_good/solidus_taxjar_spec.rb
+++ b/spec/super_good/solidus_taxjar_spec.rb
@@ -45,8 +45,9 @@ RSpec.describe SuperGood::SolidusTaxJar do
end
describe ".line_item_tax_label_maker" do
- subject { described_class.line_item_tax_label_maker.(taxjar_line_item) }
+ subject { described_class.line_item_tax_label_maker.(taxjar_line_item, spree_line_item) }
let(:taxjar_line_item) { instance_double Taxjar::BreakdownLineItem }
+ let(:spree_line_item) { Spree::LineItem.new }
it { is_expected.to eq "Sales Tax" }
end
end