Project

General

Profile

Actions

Patch #30347

closed

test_links_separated_with_line_break_should_link tests nothing

Added by Yuichi HARADA about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Since Redmine::WikiFormattingTest#test_links_separated_with_line_break_should_link ( source:trunk/test/unit/lib/redmine/wiki_formatting_test.rb#L57 ) does not have an assert method, the test is not executed.

$ bundle exec rake test TEST=test/unit/lib/redmine/wiki_formatting_test.rb:57
Run options: --seed 9224

# Running:

.

Finished in 0.023977s, 41.7066 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 0 errors, 0 skips
$

I made a patch, and attach it.

diff --git a/test/unit/lib/redmine/wiki_formatting_test.rb b/test/unit/lib/redmine/wiki_formatting_test.rb
index b460bad35..6f05d3ef9 100644
--- a/test/unit/lib/redmine/wiki_formatting_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting_test.rb
@@ -64,14 +64,15 @@ DIFF
 <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

   def test_supports_section_edit
     with_settings :text_formatting => 'textile' do
       assert_equal true, Redmine::WikiFormatting.supports_section_edit?
     end
-
+
     with_settings :text_formatting => '' do
       assert_equal false, Redmine::WikiFormatting.supports_section_edit?
     end


Files

append_assert.patch (919 Bytes) append_assert.patch Yuichi HARADA, 2019-01-07 06:52
Actions

Also available in: Atom PDF