add tests for open issues

This commit is contained in:
Carsten Otto 2017-03-05 15:18:46 +01:00
parent c0d20f2e1f
commit afb0f03fd3

View file

@ -44,12 +44,26 @@ class RenderingHelperTest < ActionView::TestCase
assert_equal(expected, actual)
end
test "http link (with double hyphens)" do
# not implemented, see issue #2056
# actual = render_text("http://foo.bar/foo--bar")
# expected = '<p><a target="_blank" href="http://foo.bar/foo--bar">http://foo.bar/foo--bar</a></p>'
# assert_equal(expected, actual)
end
test "textile http link" do
actual = render_text('A link to "GitHub":http://github.com/.')
expected = '<p>A link to <a href="http://github.com/">GitHub</a>.</p>'
assert_equal(expected, actual)
end
test "textile http link (in new window)" do
# not implemented, see issue #2066
# actual = render_text('A link to "GitHub":http://github.com/.')
# expected = '<p>A link to <a target="_blank" href="http://github.com/">GitHub</a>.</p>'
# assert_equal(expected, actual)
end
test "url with slash in query string" do
# See http://blog.swivel.com/code/2009/06/rails-auto_link-and-certain-query-strings.html
actual = render_text("foo http://example.com/foo?bar=/baz bar")