#138 fix tests for changed emoji path

This commit is contained in:
Alexander Meindl 2022-06-01 16:49:50 +02:00
parent d86973d0a5
commit b19338ba5f
3 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ module WikiFormatting
</code></pre> </code></pre>
HTML HTML
expected = <<~HTML expected = <<~HTML
<img title="heavy black heart" class="inline_emojify" src="http://localhost:3000/images/emojis/emoji_u2764.png"> <img title="heavy black heart" class="inline_emojify" src="http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png">
<pre><code> <pre><code>
def foo def foo
:heart: :heart:

View File

@ -27,7 +27,7 @@ module WikiFormatting
disable_emoji_native_support: 1 do disable_emoji_native_support: 1 do
text = 'A test with a :heart: emoji' text = 'A test with a :heart: emoji'
assert_equal '<p>A test with a <img title="heavy black heart" class="inline_emojify"' \ assert_equal '<p>A test with a <img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" /> emoji</p>', " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" /> emoji</p>",
@formatter.new(text).to_html.strip @formatter.new(text).to_html.strip
end end
end end
@ -38,14 +38,14 @@ module WikiFormatting
disable_emoji_native_support: 1 do disable_emoji_native_support: 1 do
text = ':heart: and :)' text = ':heart: and :)'
assert_equal '<p><img title="heavy black heart" class="inline_emojify"' \ assert_equal '<p><img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" />' \ " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" />" \
' and <span class="additionals smiley smiley-smiley" title=":)"></span></p>', ' and <span class="additionals smiley smiley-smiley" title=":)"></span></p>',
@formatter.new(text).to_html.strip @formatter.new(text).to_html.strip
text = ' :) and :heart:' text = ' :) and :heart:'
assert_equal '<p><span class="additionals smiley smiley-smiley" title=":)"></span> and' \ assert_equal '<p><span class="additionals smiley smiley-smiley" title=":)"></span> and' \
' <img title="heavy black heart" class="inline_emojify"' \ ' <img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" /></p>', " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" /></p>",
@formatter.new(text).to_html.strip @formatter.new(text).to_html.strip
end end
end end

View File

@ -34,7 +34,7 @@ module WikiFormatting
str = 'A test with a :heart: emoji and a :) smiley' str = 'A test with a :heart: emoji and a :) smiley'
@to_test[str] = 'A test with a <img title="heavy black heart" class="inline_emojify"' \ @to_test[str] = 'A test with a <img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" /> emoji and a :) smiley' " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" /> emoji and a :) smiley"
assert_html_output @to_test assert_html_output @to_test
end end
end end
@ -47,11 +47,11 @@ module WikiFormatting
@formatter::RULES << :inline_smileys @formatter::RULES << :inline_smileys
@to_test[':heart: and :)'] = '<img title="heavy black heart" class="inline_emojify"' \ @to_test[':heart: and :)'] = '<img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" />' \ " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" />" \
' and <span class="additionals smiley smiley-smiley" title=":)"></span>' ' and <span class="additionals smiley smiley-smiley" title=":)"></span>'
@to_test[':) and :heart:'] = '<span class="additionals smiley smiley-smiley" title=":)"></span> and' \ @to_test[':) and :heart:'] = '<span class="additionals smiley smiley-smiley" title=":)"></span> and' \
' <img title="heavy black heart" class="inline_emojify"' \ ' <img title="heavy black heart" class="inline_emojify"' \
' src="http://localhost:3000/images/emojis/emoji_u2764.png" />' " src=\"http://localhost:3000/#{Additionals::EMOJI_ASSERT_PATH}/emoji_u2764.png\" />"
assert_html_output @to_test assert_html_output @to_test
end end
end end