Patch #37477

Add missing fixture issue_categories to MyControllerTest

Added by Go MAEDA 27 days ago. Updated 27 days ago.

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

0%

Category:Code cleanup/refactoring
Target version:5.1.0

Description

$ bin/rake db:reset
$ bin/rails test test/functional/my_controller_test.rb
Run options: --seed 44987

# Running:

.....................E

Error:
MyControllerTest#test_page_with_watched_issues_block_should_not_show_issues_from_closed_projects:
ActiveRecord::RecordInvalid: Validation failed: Category is not included in the list
    test/functional/my_controller_test.rb:355:in `test_page_with_watched_issues_block_should_not_show_issues_from_closed_projects'

rails test test/functional/my_controller_test.rb:347

.....................E

Error:
MyControllerTest#test_page_with_reported_issues_block_should_not_show_issues_from_closed_projects:
ActiveRecord::RecordInvalid: Validation failed: Category is not included in the list
    test/functional/my_controller_test.rb:327:in `test_page_with_reported_issues_block_should_not_show_issues_from_closed_projects'

rails test test/functional/my_controller_test.rb:319

E

Error:
MyControllerTest#test_page_with_assigned_issues_block_should_not_show_issues_from_closed_projects:
ActiveRecord::RecordInvalid: Validation failed: Category is not included in the list
    test/functional/my_controller_test.rb:299:in `test_page_with_assigned_issues_block_should_not_show_issues_from_closed_projects'

rails test test/functional/my_controller_test.rb:291

.....

Associated revisions

Revision 21728
Added by Go MAEDA 27 days ago

Add missing fixture issue_categories to MyControllerTest (#37477).

History

#1 Updated by Go MAEDA 27 days ago

Here is a patch to fix the issue.

diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index a2442dc4d..a5ab1f69f 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -24,7 +24,7 @@ class MyControllerTest < Redmine::ControllerTest
            :roles, :projects, :members, :member_roles,
            :issues, :issue_statuses, :trackers, :enumerations,
            :custom_fields, :auth_sources, :queries, :enabled_modules,
-           :journals, :projects_trackers
+           :journals, :projects_trackers, :issue_categories

   def setup
     @request.session[:user_id] = 2

#2 Updated by Go MAEDA 27 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the fix.

Also available in: Atom PDF