Skip to content

Commit

Permalink
Merge pull request #4909 from luisramos0/line_items_spec
Browse files Browse the repository at this point in the history
Adapt line_items_spec to work in the rails 4 branch as well
  • Loading branch information
sauloperez authored Mar 25, 2020
2 parents 8dfdc9b + 1382bb3 commit 87fae15
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spec/models/spree/line_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ module Spree

describe "finding line items with and without tax" do
let(:tax_rate) { create(:tax_rate, calculator: Spree::Calculator::DefaultTax.new) }
let!(:adjustment1) { create(:adjustment, adjustable: li1, originator: tax_rate, label: "TR", amount: 123, included_tax: 10.00) }
let!(:adjustment2) { create(:adjustment, adjustable: li1, originator: tax_rate, label: "TR", amount: 123, included_tax: 10.00) }
let!(:adjustment1) { create(:adjustment, originator: tax_rate, label: "TR", amount: 123, included_tax: 10.00) }

before { li1; li2 }
before do
li1
li2
li1.adjustments << adjustment1
end

it "finds line items with tax" do
expect(LineItem.with_tax).to eq([li1])
Expand Down

0 comments on commit 87fae15

Please sign in to comment.