Test Attached::Many in Attached::Many test

This exact test exists in `one_test.rb`.  It was probably overlooked
after being copied and pasted.
This commit is contained in:
Jonathan Hefner 2020-05-22 22:52:38 -05:00
parent b1f6d8c8d8
commit 03f5f57af0
1 changed files with 3 additions and 3 deletions

View File

@ -325,12 +325,12 @@ class ActiveStorage::ManyAttachedTest < ActiveSupport::TestCase
test "attaching an existing blob from a signed ID to a new record" do
User.new(name: "Jason").tap do |user|
user.avatar.attach create_blob(filename: "funky.jpg").signed_id
user.highlights.attach create_blob(filename: "funky.jpg").signed_id
assert user.new_record?
assert_equal "funky.jpg", user.avatar.filename.to_s
assert_equal "funky.jpg", user.highlights.first.filename.to_s
user.save!
assert_equal "funky.jpg", user.reload.avatar.filename.to_s
assert_equal "funky.jpg", user.reload.highlights.first.filename.to_s
end
end