]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/ClosingHeredocIndentation in test/unit/lib/redmine/wiki_...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 22 Nov 2019 14:54:43 +0000 (14:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 22 Nov 2019 14:54:43 +0000 (14:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19170 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
test/unit/lib/redmine/wiki_formatting_test.rb

index 59fc5d1ec02835b1e92450e14c0f953951084250..0bbf8cbde902231d55804393d2788b4cf3ad6a2f 100644 (file)
@@ -39,11 +39,6 @@ Layout/AlignArguments:
 Layout/AlignHash:
   Enabled: false
 
-# Cop supports --auto-correct.
-Layout/ClosingHeredocIndentation:
-  Exclude:
-    - 'test/unit/lib/redmine/wiki_formatting_test.rb'
-
 # Cop supports --auto-correct.
 Layout/ClosingParenthesisIndentation:
   Enabled: false
index a9a4e468141858c0bb39b341ed9b148382190cd6..1c5d4d20f531cd382d8fe816744907c47d0cf216 100644 (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