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:
Luis Ramos
2020-03-05 17:07:08 +00:00
parent 829a73c58d
commit f23575302b

View File

@@ -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