Skip to content

Commit

Permalink
Fixed test warnings with Ruby 3.4 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Dec 29, 2024
1 parent 805296b commit 694bc28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/active_storage_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_rotate_encryption_one
message = "hello world"
filename = "test.txt"
content_type = "image/png"
user = User.create!(avatar: {io: StringIO.new(message), filename: filename, content_type: content_type})
user = User.create!(avatar: {io: StringIO.new(message.dup), filename: filename, content_type: content_type})
blob = user.avatar.attachment.blob
user.avatar.rotate_encryption!

Expand Down Expand Up @@ -477,7 +477,7 @@ def contents

def attachment(content = nil)
content ||= self.content
{io: StringIO.new(content), filename: "#{content.downcase.gsub(" ", "-")}.txt"}
{io: StringIO.new(content.dup), filename: "#{content.downcase.gsub(" ", "-")}.txt"}
end

def attachments
Expand Down

0 comments on commit 694bc28

Please sign in to comment.