aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/preview_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/models/preview_test.rb')
-rw-r--r--activestorage/test/models/preview_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activestorage/test/models/preview_test.rb b/activestorage/test/models/preview_test.rb
index 317a2d5c58..bcd8442f4b 100644
--- a/activestorage/test/models/preview_test.rb
+++ b/activestorage/test/models/preview_test.rb
@@ -7,6 +7,7 @@ class ActiveStorage::PreviewTest < ActiveSupport::TestCase
test "previewing a PDF" do
blob = create_file_blob(filename: "report.pdf", content_type: "application/pdf")
preview = blob.preview(resize: "640x280").processed
+
assert preview.image.attached?
assert_equal "report.png", preview.image.filename.to_s
assert_equal "image/png", preview.image.content_type
@@ -19,6 +20,7 @@ class ActiveStorage::PreviewTest < ActiveSupport::TestCase
test "previewing an MP4 video" do
blob = create_file_blob(filename: "video.mp4", content_type: "video/mp4")
preview = blob.preview(resize: "640x280").processed
+
assert preview.image.attached?
assert_equal "video.png", preview.image.filename.to_s
assert_equal "image/png", preview.image.content_type