1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/variant_test.rb

18 lines
480 B
Ruby
Raw Normal View History

2017-07-11 12:53:17 -04:00
require "test_helper"
require "database/setup"
require "active_storage/variant"
2017-07-21 16:52:09 -04:00
class ActiveStorage::VariantTest < ActiveSupport::TestCase
2017-07-21 16:51:31 -04:00
setup do
@blob = create_image_blob filename: "racecar.jpg"
2017-07-21 16:51:31 -04:00
end
test "resized variation" do
assert_match /racecar.jpg/, @blob.variant(resize: "100x100").processed.url
end
2017-07-11 12:53:17 -04:00
2017-07-21 16:51:31 -04:00
test "resized and monochrome variation" do
assert_match /racecar.jpg/, @blob.variant(resize: "100x100", monochrome: true).processed.url
2017-07-11 12:53:17 -04:00
end
end