提交 03f5f57a 编写于 作者: J Jonathan Hefner

Test Attached::Many in Attached::Many test

This exact test exists in `one_test.rb`.  It was probably overlooked
after being copied and pasted.
上级 b1f6d8c8
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册