fixes #2095
This commit is contained in:
@@ -105,7 +105,7 @@ class DTextTest < ActiveSupport::TestCase
|
||||
assert_equal('<p>a (<a href="http://test.com">http://test.com</a>) b</p>', p('a (http://test.com) b'))
|
||||
end
|
||||
|
||||
def test_old_syle_links
|
||||
def test_old_style_links
|
||||
assert_equal('<p><a href="http://test.com">test</a></p>', p('"test":http://test.com'))
|
||||
end
|
||||
|
||||
@@ -113,6 +113,16 @@ class DTextTest < ActiveSupport::TestCase
|
||||
assert_equal('<p>"1" <a href="http://three.com">2 & 3</a></p>', p('"1" "2 & 3":http://three.com'))
|
||||
end
|
||||
|
||||
def test_new_style_links
|
||||
assert_equal('<p><a href="http://test.com">test</a></p>', p('"test":[http://test.com]'))
|
||||
end
|
||||
|
||||
def test_new_style_links_with_parentheses
|
||||
assert_equal('<p><a href="http://test.com/(parentheses)">test</a></p>', p('"test":[http://test.com/(parentheses)]'))
|
||||
assert_equal('<p>(<a href="http://test.com/(parentheses)">test</a>)</p>', p('("test":[http://test.com/(parentheses)])'))
|
||||
assert_equal('<p>[<a href="http://test.com/(parentheses)">test</a>]</p>', p('["test":[http://test.com/(parentheses)]]'))
|
||||
end
|
||||
|
||||
def test_lists_1
|
||||
assert_equal('<ul><li>a</li></ul>', p('* a'))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user