mirror of
https://github.com/sdsykes/fastimage.git
synced 2025-12-30 00:05:02 -05:00
Add test for invalid ico files
This commit is contained in:
parent
b9453d7733
commit
a0808275f8
@ -358,4 +358,11 @@ class FastImageTest < Test::Unit::TestCase
|
||||
url = "#{TestUrl}test.gif"
|
||||
assert_equal 1, FastImage.new(url).orientation
|
||||
end
|
||||
|
||||
def test_should_raise_when_handling_invalid_ico_files
|
||||
stringio = StringIO.new("\x00\x00003")
|
||||
assert_raises(FastImage::UnknownImageType) do
|
||||
FastImage.type(stringio, :raise_on_failure => true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user