Skip to content

Commit 10d74db

Browse files
authored
Merge pull request rails#42226 from santib/fix-intermittent-test
Fix ActiveStorage intermittent test
2 parents 356916b + 29bc318 commit 10d74db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

activestorage/test/models/attached/many_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,10 @@ def highlights
655655
@user.reload
656656

657657
racecar_blob = fixture_file_upload("racecar.jpg")
658+
attachment_id = town_blob.attachments.find_by!(record: @user).id
658659
@user.update(
659660
highlights: [racecar_blob],
660-
highlights_attachments_attributes: [{ id: town_blob.id, _destroy: true }]
661+
highlights_attachments_attributes: [{ id: attachment_id, _destroy: true }]
661662
)
662663

663664
assert @user.reload.highlights.attached?

0 commit comments

Comments
 (0)