From f5c7a4a4208c9c146544b4498de3a08761cbc55a Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 11 Aug 2019 05:01:37 +0000 Subject: Convert HTML links to Textile/Markdown links when creating an issue from an email (#31695). Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@18361 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb | 5 +++++ test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'test') diff --git a/test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb b/test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb index 63fc4ae5c..6a4b77387 100644 --- a/test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb @@ -28,5 +28,10 @@ class Redmine::WikiFormatting::MarkdownHtmlParserTest < ActiveSupport::TestCase def test_should_convert_tags assert_equal 'A **simple** html snippet.', @parser.to_text('

A simple html snippet.

') + + assert_equal 'foo [bar](http://example.com/) baz', + @parser.to_text('foobarbaz') + assert_equal 'foo http://example.com/ baz', + @parser.to_text('foobaz') end end diff --git a/test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb index 8d6f78689..a338ed528 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb @@ -28,5 +28,10 @@ class Redmine::WikiFormatting::TextileHtmlParserTest < ActiveSupport::TestCase def test_should_convert_tags assert_equal 'A *simple* html snippet.', @parser.to_text('

A simple html snippet.

') + + assert_equal 'foo "bar":http://example.com/ baz', + @parser.to_text('foobarbaz') + assert_equal 'foo http://example.com/ baz', + @parser.to_text('foobaz') end end -- cgit v1.2.3