Commit 9f3fec1d by Steve

Added a test to ensure the given modifier is passed to ImageMagick (even when…

Added a test to ensure the given modifier is passed to ImageMagick (even when only one dimension is present).
parent db9cbbc5
......@@ -44,11 +44,6 @@ class GeometryTest < Test::Unit::TestCase
assert_equal 0, @geo.height
end
should "ensure the modifier is nil if only one dimension present" do
assert @geo = Paperclip::Geometry.parse("123x")
assert_nil @geo.modifier
end
should "ensure the modifier is nil if not present" do
assert @geo = Paperclip::Geometry.parse("123x456")
assert_nil @geo.modifier
......@@ -60,6 +55,13 @@ class GeometryTest < Test::Unit::TestCase
assert_equal mod, @geo.modifier
end
end
['>', '<', '#', '@', '%', '^', '!'].each do |mod|
should "ensure the modifier #{mod} gets passed to ImageMagic" do
assert @geo = Paperclip::Geometry.parse("123x#{mod}")
assert_equal mod, @geo.to_s.last
end
end
should "make sure the modifier gets passed during transformation_to" do
assert @src = Paperclip::Geometry.parse("123x456")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment