This needs to be revisited. I'm not sure it's the most appropriate spec
as it seems to be testing just part of story.
This commit is contained in:
Pau Perez
2019-07-05 13:09:41 +02:00
parent 9b03833df0
commit 8ab77b077b

View File

@@ -208,7 +208,11 @@ describe Spree::Admin::ReportsController, type: :controller do
it "only shows product line items that I am supplying" do
spree_post :orders_and_fulfillment, q: {}
expect(resulting_products).to include product1
table_items = assigns(:report).table_items
variant = Spree::Variant.unscoped.find(table_items.first.variant_id)
expect(variant.product).to eq(product1)
end
end
end