Defect #30120

Add missing fixture for reports_controller_test

Added by Marius BALTEANU 10 months ago. Updated 10 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.0.0
Resolution:Fixed Affected version:

Description

Running test/functional/reports_controller_test.rb in isolation will fail because of a missing fixtures. I've detected the issue here: https://gitlab.com/marius-balteanu/redmine/-/jobs/130977733


root@45ec3a6558b0:/work# ruby test/functional/reports_controller_test.rb 
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:14)
Run options: --seed 6130

# Running:

...F

Failure:
ReportsControllerTest#test_issue_report_without_subprojects_issues [test/functional/reports_controller_test.rb:61]:
Expected at least 1 element matching "table.list tbody :nth-child(1):first", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/reports_controller_test.rb:53

F

Failure:
ReportsControllerTest#test_issue_report_with_subprojects_issues [test/functional/reports_controller_test.rb:45]:
Expected at least 1 element matching "table.list tbody :nth-child(1):first", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/reports_controller_test.rb:37

F

Failure:
ReportsControllerTest#test_get_issue_report_details_by_tracker_without_subprojects_issues [test/functional/reports_controller_test.rb:138]:
Expected at least 1 element matching "table.list tbody :nth-child(1)", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/reports_controller_test.rb:129

F

Failure:
ReportsControllerTest#test_get_issue_report_details_by_tracker_should_show_issue_count [test/functional/reports_controller_test.rb:163]:
Expected at least 1 element matching "table.list tbody :nth-child(1)", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/reports_controller_test.rb:152

F

Failure:
ReportsControllerTest#test_get_issue_report_details_by_tracker_with_subprojects_issues [test/functional/reports_controller_test.rb:115]:
Expected at least 1 element matching "table.list tbody :nth-child(1)", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/reports_controller_test.rb:106

The fix:

diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb
index 0b922f288..c1b60bcdd 100644
--- a/test/functional/reports_controller_test.rb
+++ b/test/functional/reports_controller_test.rb
@@ -25,7 +25,8 @@ class ReportsControllerTest < Redmine::ControllerTest
            :member_roles,
            :members,
            :enabled_modules,
-           :versions
+           :versions,
+           :workflows

   def test_get_issue_report
     get :issue_report, :params => {

Associated revisions

Revision 17694
Added by Go MAEDA 10 months ago

Add missing fixture for reports_controller_test (#30120).

Patch by Marius BALTEANU.

History

#1 Updated by Marius BALTEANU 10 months ago

  • Subject changed from Add missing fixtures for Reports controller test to Add missing fixture for reports_controller_test

#2 Updated by Go MAEDA 10 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from Candidate for next minor release to 4.0.0
  • Resolution set to Fixed

Committed. Thanks.

Also available in: Atom PDF