mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #42226 from santib/fix-intermittent-test
Fix ActiveStorage intermittent test
This commit is contained in:
commit
10d74dbe86
1 changed files with 2 additions and 1 deletions
|
@ -655,9 +655,10 @@ class ActiveStorage::ManyAttachedTest < ActiveSupport::TestCase
|
|||
@user.reload
|
||||
|
||||
racecar_blob = fixture_file_upload("racecar.jpg")
|
||||
attachment_id = town_blob.attachments.find_by!(record: @user).id
|
||||
@user.update(
|
||||
highlights: [racecar_blob],
|
||||
highlights_attachments_attributes: [{ id: town_blob.id, _destroy: true }]
|
||||
highlights_attachments_attributes: [{ id: attachment_id, _destroy: true }]
|
||||
)
|
||||
|
||||
assert @user.reload.highlights.attached?
|
||||
|
|
Loading…
Reference in a new issue