Remove hack to allow IO files in Active Storage
We were using this hack in order to allow `File.new` attachments in tests files. However, we can use the `fixture_file_upload` helper instead. Just like it happened with `file_fixture`, this helper method doesn't work in fixtures, so in this case we're using `Rack::Test::UploadedFile` instead.
This commit is contained in:
@@ -35,7 +35,7 @@ describe "active storage tasks" do
|
||||
end
|
||||
|
||||
it "does not modify old ckeditor attachments" do
|
||||
image = Ckeditor::Picture.create!(data: Rack::Test::UploadedFile.new(file_fixture("clippy.png")))
|
||||
image = Ckeditor::Picture.create!(data: fixture_file_upload("clippy.png"))
|
||||
|
||||
expect(image.storage_data.attachment.name).to eq "storage_data"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user