Fix intermittent failure via FK when deleted taxon is primary taxon on p2

This commit is contained in:
Rohan Mitchell
2016-11-25 09:37:05 +11:00
parent b7e9ffc9da
commit 631b19084a

View File

@@ -7,7 +7,7 @@ module Spree
let!(:t2) { create(:taxon) }
describe "callbacks" do
let!(:p2) { create(:simple_product, taxons: [t1]) }
let!(:p2) { create(:simple_product, taxons: [t1], primary_taxon: t2) }
it "refreshes the products cache on save" do
expect(OpenFoodNetwork::ProductsCache).to receive(:product_changed).with(p2)