Project

General

Profile

Actions

Defect #30120

closed

Add missing fixture for reports_controller_test

Added by Marius BĂLTEANU almost 6 years ago. Updated almost 6 years ago.

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

0%

Estimated time:
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 => {

Actions

Also available in: Atom PDF