summaryrefslogtreecommitdiffstats
path: root/test/unit/lib/redmine
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-22 14:54:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-22 14:54:43 +0000
commit0095bbbd728c90839607ced438d29cb72ae4570c (patch)
treebdfa82a7b6bf32ba770485f997b499b6345e4c56 /test/unit/lib/redmine
parent19d0fe302b7856071c25908abbf9abee333ca727 (diff)
downloadredmine-0095bbbd728c90839607ced438d29cb72ae4570c.tar.gz
redmine-0095bbbd728c90839607ced438d29cb72ae4570c.zip
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
Diffstat (limited to 'test/unit/lib/redmine')
-rw-r--r--test/unit/lib/redmine/wiki_formatting_test.rb36
1 files changed, 16 insertions, 20 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting_test.rb b/test/unit/lib/redmine/wiki_formatting_test.rb
index a9a4e4681..1c5d4d20f 100644
--- a/test/unit/lib/redmine/wiki_formatting_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting_test.rb
@@ -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