Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
justinko committed May 29, 2024
1 parent 7511c28 commit 80a6291
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activestorage/test/models/attachment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ class ActiveStorage::AttachmentTest < ActiveSupport::TestCase
assert_nothing_raised { attachment.destroy }
end

test "can create an attachment with the record having no attachment reflections" do
assert_nothing_raised { ActiveStorage::Attachment.create!(name: "whatever", record: @user, blob: create_blob) }
end

private
def assert_blob_identified_before_owner_validated(owner, blob, content_type)
validated_content_type = nil
Expand Down

0 comments on commit 80a6291

Please sign in to comment.