Patch #32023

Add missing fixtures to IssueStatusesControllerTest

Added by Yuichi HARADA almost 3 years ago. Updated almost 3 years ago.

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


Category:Code cleanup/refactoring
Target version:4.1.0


IssueStatusesControllerTest#test_index_should_show_warning_when_no_workflow_is_defined has failed.

$ RAILS_ENV=test bundle exec rake db:migrate:reset

$ RAILS_ENV=test bundle exec rake test TEST=test/functional/issue_statuses_controller_test.rb
Run options: --seed 33320

# Running:


IssueStatusesControllerTest#test_index_should_show_warning_when_no_workflow_is_defined [test/functional/issue_statuses_controller_test.rb:54]:
Expected exactly 0 elements matching "tr:not(:last-of-type) span.icon-warning", found 6..
Expected: 0
  Actual: 6

bin/rails test test/functional/issue_statuses_controller_test.rb:48


Finished in 1.213545s, 12.3605 runs/s, 37.0814 assertions/s.
15 runs, 45 assertions, 1 failures, 0 errors, 0 skips

I think that because the fixtures is not enough.

diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb
index e46e807b9..a67ae87d7 100644
--- a/test/functional/issue_statuses_controller_test.rb
+++ b/test/functional/issue_statuses_controller_test.rb
@@ -20,7 +20,7 @@
 require File.expand_path('../../test_helper', __FILE__)

 class IssueStatusesControllerTest < Redmine::ControllerTest
-  fixtures :issue_statuses, :issues, :users, :trackers
+  fixtures :issue_statuses, :issues, :users, :trackers, :workflows

   def setup
     User.current = nil

Associated revisions

Revision 18438
Added by Go MAEDA almost 3 years ago

Add missing fixture to IssueStatusesControllerTest (#32023).

Patch by Yuichi HARADA.


#1 Updated by Go MAEDA almost 3 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version set to 4.1.0

Committed the patch. Thank you for fixing the issue.

Also available in: Atom PDF