Project

General

Profile

Defect #31507

Updated by Marius BÄ‚LTEANU almost 5 years ago

The test @test_partials_with_html_entities@ fails if the trailing whitespaces are removed. The attached patch can be used to reproduce the below problem: 

 <pre><code> 
 notroot@eb7d0b73147d:/work$ ruby test/unit/lib/redmine/unified_diff_test.rb -n test_partials_with_html_entities 
 DEPRECATION WARNING: `secrets.secret_token` is deprecated in favor of `secret_key_base` and will be removed in Rails 6.0. (called from <top (required)> at /work/config/environment.rb:16) 
 Run options: -n test_partials_with_html_entities --seed 55482 

 # Running: 

 E 

 Error: 
 Redmine::UnifiedDiffTest#test_partials_with_html_entities: 
 NoMethodError: undefined method `html_line_left' for nil:NilClass 
     test/unit/lib/redmine/unified_diff_test.rb:106:in `test_partials_with_html_entities' 


 bin/rails test test/unit/lib/redmine/unified_diff_test.rb:92 
 </code></pre>  

 I wasn't able to fix the test without changing the diff, any solution is welcome.

Back