mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #4909 from luisramos0/line_items_spec
Adapt line_items_spec to work in the rails 4 branch as well
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user