cleanup: rubocop: fix Layout/ClosingHeredocIndentation in test/unit/lib/redmine/wiki_formatting_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19170 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-11-22 14:54:43 +00:00
parent 19d0fe302b
commit 0095bbbd72
2 changed files with 16 additions and 25 deletions

View File

@@ -37,16 +37,14 @@ class Redmine::WikiFormattingTest < ActiveSupport::TestCase
end
def test_should_link_urls_and_email_addresses
raw = <<-DIFF
This is a sample *text* with a link: http://www.redmine.org
and an email address foo@example.net
DIFF
expected = <<-EXPECTED
<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
raw = <<~DIFF
This is a sample *text* with a link: http://www.redmine.org
and an email address foo@example.net
DIFF
expected = <<~EXPECTED
<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]}, '')
end
@@ -57,16 +55,14 @@ EXPECTED
end
def test_links_separated_with_line_break_should_link
raw = <<-DIFF
link: https://www.redmine.org
http://www.redmine.org
DIFF
expected = <<-EXPECTED
<p>link: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a><br />
<a class="external" href="http://www.redmine.org">http://www.redmine.org</a></p>
EXPECTED
raw = <<~DIFF
link: https://www.redmine.org
http://www.redmine.org
DIFF
expected = <<~EXPECTED
<p>link: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a><br />
<a class="external" href="http://www.redmine.org">http://www.redmine.org</a></p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
end