mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
In rails 4 variant.destroy is removing the variants from the exchanges as needed and variant.exchange_variants becomes immediatly empty but variant.exchanges is not automatically updated anymore and needs a refresh to become empty
This commit is contained in:
@@ -69,7 +69,7 @@ module Spree
|
||||
variant.exchanges << exchange
|
||||
|
||||
spree_delete :destroy, id: variant.id, product_id: variant.product.permalink, format: 'html'
|
||||
expect(variant.exchanges).to be_empty
|
||||
expect(variant.exchanges.reload).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user