diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 18:14:09 -0500 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 23:32:59 -0500 |
commit | 94333a4c31bd10c1f358c538a167e6a4589bae2d (patch) | |
tree | 9106c349180bbdcba2e7839e0e79144e3a15a055 /activestorage/test/models/preview_test.rb | |
parent | 211adb47e76b358ea15a3f756431c042ab231c23 (diff) | |
download | rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.gz rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.bz2 rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.zip |
Use assert_predicate and assert_not_predicate
Diffstat (limited to 'activestorage/test/models/preview_test.rb')
-rw-r--r-- | activestorage/test/models/preview_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activestorage/test/models/preview_test.rb b/activestorage/test/models/preview_test.rb index b0c6d2c45b..55fdc228c8 100644 --- a/activestorage/test/models/preview_test.rb +++ b/activestorage/test/models/preview_test.rb @@ -8,7 +8,7 @@ class ActiveStorage::PreviewTest < ActiveSupport::TestCase blob = create_file_blob(filename: "report.pdf", content_type: "application/pdf") preview = blob.preview(resize: "640x280").processed - assert preview.image.attached? + assert_predicate preview.image, :attached? assert_equal "report.png", preview.image.filename.to_s assert_equal "image/png", preview.image.content_type @@ -21,7 +21,7 @@ class ActiveStorage::PreviewTest < ActiveSupport::TestCase blob = create_file_blob(filename: "video.mp4", content_type: "video/mp4") preview = blob.preview(resize: "640x280").processed - assert preview.image.attached? + assert_predicate preview.image, :attached? assert_equal "video.png", preview.image.filename.to_s assert_equal "image/png", preview.image.content_type |