diff options
author | Jared Norman <jared@super.gd> | 2019-02-06 17:10:01 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-02-06 17:10:01 -0800 |
commit | 9a83ec4cda37760aad82373dc422cadbb33eddfe (patch) | |
tree | a136292d1398688018c92c415b7d6b31dae59d47 /spec | |
parent | 495f343ce7c93421bbde12745a127aff59ef30d0 (diff) |
Provide Spree line items to label makerv0.6.0
Diffstat (limited to 'spec')
-rw-r--r-- | spec/super_good/solidus_taxjar/tax_calculator_spec.rb | 4 | ||||
-rw-r--r-- | spec/super_good/solidus_taxjar_spec.rb | 3 |
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 |