Jump to the current tab when using the project quick-jump combo (#2364).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2210 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-30 14:24:51 +00:00
parent 6eee9dbf88
commit 2355324d73
4 changed files with 37 additions and 4 deletions
@@ -287,6 +287,23 @@ class ProjectsControllerTest < Test::Unit::TestCase
assert Project.find(1).active?
end
def test_jump_should_redirect_to_active_tab
get :show, :id => 1, :jump => 'issues'
assert_redirected_to 'projects/ecookbook/issues'
end
def test_jump_should_not_redirect_to_inactive_tab
get :show, :id => 3, :jump => 'documents'
assert_response :success
assert_template 'show'
end
def test_jump_should_not_redirect_to_unknown_tab
get :show, :id => 3, :jump => 'foobar'
assert_response :success
assert_template 'show'
end
def test_project_menu
assert_no_difference 'Redmine::MenuManager.items(:project_menu).size' do
Redmine::MenuManager.map :project_menu do |menu|