Merge pull request #8148 from jibees/5236-remove-incomplete-orders-from-admin-interface-2

Only shows order that actually have at least one line_item V2
This commit is contained in:
Andy Brett
2021-09-09 16:49:30 -07:00
committed by GitHub
6 changed files with 37 additions and 10 deletions

View File

@@ -849,6 +849,16 @@ describe Spree::Order do
expect(Spree::Order.not_state(:canceled)).not_to include o
end
end
describe "not_empty" do
let!(:order_with_line_items) { create(:order_with_line_items, line_items_count: 1) }
let!(:order_without_line_items) { create(:order) }
it "returns only orders which have line items" do
expect(Spree::Order.not_empty).to include order_with_line_items
expect(Spree::Order.not_empty).to_not include order_without_line_items
end
end
end
describe "sending confirmation emails" do