Project

General

Profile

Actions

Patch #37477

closed

Add missing fixture issue_categories to MyControllerTest

Added by Go MAEDA over 2 years ago. Updated over 2 years ago.

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

0%

Estimated time:

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

.....
Actions #1

Updated by Go MAEDA over 2 years 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
Actions #2

Updated by Go MAEDA over 2 years ago

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

Committed the fix.

Actions

Also available in: Atom PDF