0003-Add-a-test-for-34595.patch

Marius BALTEANU, 2021-03-15 23:51

Download (1.13 KB)

View differences:

test/unit/lib/redmine/project_jump_box_test.rb
135 135
    assert_equal @onlinestore, pjb.recently_used_projects.first
136 136
    assert_equal @ecookbook, pjb.recently_used_projects.last
137 137
  end
138

  
139
  def test_recents_list_should_include_only_visible_projects
140
    @user = User.find_by_login 'dlopper'
141
    User.current = @user
142

  
143
    pjb = Redmine::ProjectJumpBox.new @user
144
    pjb.project_used @ecookbook
145
    pjb.project_used @onlinestore
146

  
147
    assert_equal 1, pjb.recently_used_projects.size
148
    assert_equal @ecookbook, pjb.recently_used_projects.first
149
  end
138 150
end
139
-