Extracted auto_link and auto_mailto to a module.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9063 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -940,7 +940,7 @@ RAW
|
||||
def test_default_formatter
|
||||
with_settings :text_formatting => 'unknown' do
|
||||
text = 'a *link*: http://www.example.net/'
|
||||
assert_equal '<p>a *link*: <a href="http://www.example.net/">http://www.example.net/</a></p>', textilizable(text)
|
||||
assert_equal '<p>a *link*: <a class="external" href="http://www.example.net/">http://www.example.net/</a></p>', textilizable(text)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ and an email address foo@example.net
|
||||
DIFF
|
||||
|
||||
expected = <<-EXPECTED
|
||||
<p>This is a sample *text* with a link: <a href="http://www.redmine.org">http://www.redmine.org</a><br />
|
||||
and an email address <a href="mailto:foo@example.net">foo@example.net</a></p>
|
||||
<p>This is a sample *text* with a link: <a class="external" href="http://www.redmine.org">http://www.redmine.org</a><br />
|
||||
and an email address <a class="email" href="mailto:foo@example.net">foo@example.net</a></p>
|
||||
EXPECTED
|
||||
|
||||
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
|
||||
|
||||
Reference in New Issue
Block a user