Merged r2209 to r2211 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2229 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-04 13:03:34 +00:00
parent 31178553f3
commit c9d4d3a2be
8 changed files with 102 additions and 8 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|