Sha256: 95e5806c4de5efbf5a8a863eeca09647044005c7b5b0ddb25a00baad62d9b9ee
Contents?: true
Size: 537 Bytes
Versions: 17
Compression:
Stored size: 537 Bytes
Contents
require 'test_helper' class HTML::Pipeline::EmojiFilterTest < Test::Unit::TestCase EmojiFilter = HTML::Pipeline::EmojiFilter def test_emojify filter = EmojiFilter.new("<p>:shipit:</p>", {:asset_root => 'https://foo.com'}) doc = filter.call assert_match "https://foo.com/emoji/shipit.png", doc.search('img').attr('src').value end def test_required_context_validation exception = assert_raise(ArgumentError) { EmojiFilter.call("", {}) } assert_match /:asset_root/, exception.message end end
Version data entries
17 entries across 17 versions & 3 rubygems