mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
The touch process in 'belongs_to :supplier, class_name: 'Enterprise', touch: true' must have changed in rails 4 and now we need to reload the enterprise to get the new updated_at value
This commit is contained in:
@@ -33,7 +33,7 @@ describe Enterprise do
|
||||
it "touches enterprise when the supplier of a product changes" do
|
||||
expect {
|
||||
product.update_attributes!(supplier: supplier2)
|
||||
}.to change { enterprise.updated_at }
|
||||
}.to change { enterprise.reload.updated_at }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user