diff options
author | Go MAEDA <maeda@farend.jp> | 2021-03-16 03:01:12 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-03-16 03:01:12 +0000 |
commit | 1559dda8335e19c0624b3fa42b913f859afd808b (patch) | |
tree | dd705e4477a2fa9cc130798fc6e94a49f353d223 /test/unit | |
parent | 8d80a5566c3305e1df01a6cee7fa123010f98886 (diff) | |
download | redmine-1559dda8335e19c0624b3fa42b913f859afd808b.tar.gz redmine-1559dda8335e19c0624b3fa42b913f859afd808b.zip |
Merged r20803 from trunk to 4.1-stable (#34595).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20804 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/lib/redmine/project_jump_box_test.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/unit/lib/redmine/project_jump_box_test.rb b/test/unit/lib/redmine/project_jump_box_test.rb index 38a0b78cc..0ff805c5f 100644 --- a/test/unit/lib/redmine/project_jump_box_test.rb +++ b/test/unit/lib/redmine/project_jump_box_test.rb @@ -23,7 +23,8 @@ class Redmine::ProjectJumpBoxTest < ActiveSupport::TestCase fixtures :users, :projects, :user_preferences def setup - @user = User.find_by_login 'dlopper' + @user = User.find_by_login 'jsmith' + User.current = @user @ecookbook = Project.find 'ecookbook' @onlinestore = Project.find 'onlinestore' end @@ -142,4 +143,16 @@ class Redmine::ProjectJumpBoxTest < ActiveSupport::TestCase assert_equal @onlinestore, pjb.recently_used_projects.first assert_equal @ecookbook, pjb.recently_used_projects.last end + + def test_recents_list_should_include_only_visible_projects + @user = User.find_by_login 'dlopper' + User.current = @user + + pjb = Redmine::ProjectJumpBox.new @user + pjb.project_used @ecookbook + pjb.project_used @onlinestore + + assert_equal 1, pjb.recently_used_projects.size + assert_equal @ecookbook, pjb.recently_used_projects.first + end end |