summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-06 18:18:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-06 18:18:27 +0000
commit4c2fcb08654b201371bd21a065f2368e9cad7547 (patch)
tree3b75f5c1693f1af737f762f0cbcf569aa090c112 /test
parent974d6db6dbcb7efa5d3b492005f8932db52ed2f6 (diff)
downloadredmine-4c2fcb08654b201371bd21a065f2368e9cad7547.tar.gz
redmine-4c2fcb08654b201371bd21a065f2368e9cad7547.zip
Fixed that empty Markdown image tag raises en error (#23246).
git-svn-id: http://svn.redmine.org/redmine/trunk@15607 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb
index 6222c21cc..b8aa37ff2 100644
--- a/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb
@@ -28,6 +28,10 @@ class Redmine::WikiFormatting::MarkdownFormatterTest < ActionView::TestCase
assert @formatter.new("!>[](foo.png)").to_html
end
+ def test_empty_image_should_not_raise_exception
+ assert @formatter.new("![]()").to_html
+ end
+
# re-using the formatter after getting above error crashes the
# ruby interpreter. This seems to be related to
# https://github.com/vmg/redcarpet/issues/318