Patch #35727

Add missing fixtures to Redmine::ProjectJumpBoxTest

Added by Yuichi HARADA about 1 month ago. Updated about 1 month ago.

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

0%

Category:Code cleanup/refactoring
Target version:5.0.0

Description

Redmine::ProjectJumpBoxTest has failed.

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

% RAILS_ENV=test bundle exec rake test TEST=test/unit/lib/redmine/project_jump_box_test.rb
Run options: --seed 29081

# Running:

.F

Failure:
Redmine::ProjectJumpBoxTest#test_should_update_recents_list [test/unit/lib/redmine/project_jump_box_test.rb:134]:
Expected: 2
  Actual: 1

rails test test/unit/lib/redmine/project_jump_box_test.rb:119

F

Failure:
Redmine::ProjectJumpBoxTest#test_should_limit_recently_used_projects [test/unit/lib/redmine/project_jump_box_test.rb:61]:
Expected: 1
  Actual: 0

rails test test/unit/lib/redmine/project_jump_box_test.rb:54

F

Failure:
Redmine::ProjectJumpBoxTest#test_should_record_recently_used_projects_order [test/unit/lib/redmine/project_jump_box_test.rb:71]:
Expected: 2
  Actual: 1

rails test test/unit/lib/redmine/project_jump_box_test.rb:64

....

Finished in 0.942857s, 8.4848 runs/s, 29.6970 assertions/s.
8 runs, 28 assertions, 3 failures, 0 errors, 0 skips

35727.patch Magnifier (582 Bytes) Yuichi HARADA, 2021-08-10 03:42

Associated revisions

Revision 21147
Added by Go MAEDA about 1 month ago

Add missing fixtures to Redmine::ProjectJumpBoxTest (#35727).

Patch by Yuichi HARADA.

History

#1 Updated by Yuichi HARADA about 1 month ago

It was solved with the following patch.

diff --git a/test/unit/lib/redmine/project_jump_box_test.rb b/test/unit/lib/redmine/project_jump_box_test.rb
index 9edc948e0c..7c087322d3 100644
--- a/test/unit/lib/redmine/project_jump_box_test.rb
+++ b/test/unit/lib/redmine/project_jump_box_test.rb
@@ -20,7 +20,7 @@
 require File.expand_path('../../../../test_helper', __FILE__)

 class Redmine::ProjectJumpBoxTest < ActiveSupport::TestCase
-  fixtures :users, :projects, :user_preferences
+  fixtures :users, :projects, :user_preferences, :members, :roles, :member_roles

   def setup
     @user = User.find_by_login 'jsmith'

#2 Updated by Go MAEDA about 1 month ago

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

Committed the patch. Thank you.

Also available in: Atom PDF