Defect #31507

Test fails if trailing whitespaces are removed

Added by Marius BALTEANU over 3 years ago. Updated over 3 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Code cleanup/refactoring
Target version:-
Resolution: Affected version:


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:

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:


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

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

0001-Remove-trailing-whitespaces-freom-test_partials_with.patch Magnifier (862 Bytes) Marius BALTEANU, 2019-06-03 22:04

fix-31507.patch Magnifier (757 Bytes) Go MAEDA, 2019-06-07 14:00

Related issues

Related to Redmine - Patch #31506: Remove trailing whitespaces Closed


#1 Updated by Marius BALTEANU over 3 years ago

  • Description updated (diff)

#2 Updated by Marius BALTEANU over 3 years ago

  • Related to Patch #31506: Remove trailing whitespaces added

#3 Updated by Go MAEDA over 3 years ago

Here is my patch. I could not think of any other solution.

Also available in: Atom PDF