-
-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct missing method implementation
- Loading branch information
1 parent
e1328b4
commit 61cbe4c
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class HTMLPipeline | ||
VERSION = "3.1.0" | ||
VERSION = "3.1.1" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# frozen_string_literal: true | ||
|
||
require "test_helper" | ||
require "html_pipeline/text_filter/image_filter" | ||
|
||
ImageFilter = HTMLPipeline::TextFilter::ImageFilter | ||
|
||
class HTMLPipeline | ||
class ImageFilterTest < Minitest::Test | ||
def setup | ||
@filter = ImageFilter | ||
end | ||
|
||
def test_jpg | ||
assert_equal( | ||
%(<img src="http://example.com/test.jpg" alt=""/>), | ||
@filter.call(%(http://example.com/test.jpg)), | ||
) | ||
end | ||
|
||
def test_jpeg | ||
assert_equal( | ||
%(<img src="http://example.com/test.jpeg" alt=""/>), | ||
@filter.call(%(http://example.com/test.jpeg)), | ||
) | ||
end | ||
|
||
def test_bmp | ||
assert_equal( | ||
%(<img src="http://example.com/test.bmp" alt=""/>), | ||
@filter.call(%(http://example.com/test.bmp)), | ||
) | ||
end | ||
|
||
def test_gif | ||
assert_equal( | ||
%(<img src="http://example.com/test.gif" alt=""/>), | ||
@filter.call(%(http://example.com/test.gif)), | ||
) | ||
end | ||
|
||
def test_png | ||
assert_equal( | ||
%(<img src="http://example.com/test.png" alt=""/>), | ||
@filter.call(%(http://example.com/test.png)), | ||
) | ||
end | ||
|
||
def test_https_url | ||
assert_equal( | ||
%(<img src="https://example.com/test.png" alt=""/>), | ||
@filter.call(%(https://example.com/test.png)), | ||
) | ||
end | ||
end | ||
end |