diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-05 12:17:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-05 12:17:20 +0000 |
commit | 7c1445f19a6030bc6c23f6463411fe0e6c607f41 (patch) | |
tree | 5177d4ffa5fc60c00c4f3adceecbe93cbea4118c /test | |
parent | 934e3c7de15177e3846880edfb5e8f98b0ce4b10 (diff) | |
download | redmine-7c1445f19a6030bc6c23f6463411fe0e6c607f41.tar.gz redmine-7c1445f19a6030bc6c23f6463411fe0e6c607f41.zip |
Tab "New Issue" should not be displayed if a project has no trackers (#18571).
git-svn-id: http://svn.redmine.org/redmine/trunk@13713 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/projects_controller_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 83fcf160e..abf862e2e 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -629,4 +629,18 @@ class ProjectsControllerTest < ActionController::TestCase get :show, :id => 1 assert_select 'body.project-ecookbook' end + + def test_project_menu_should_include_new_issue_link + @request.session[:user_id] = 2 + get :show, :id => 1 + assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]', :text => 'New issue' + end + + def test_project_menu_should_not_include_new_issue_link_for_project_without_trackers + Project.find(1).trackers.clear + + @request.session[:user_id] = 2 + get :show, :id => 1 + assert_select '#main-menu a.new-issue', 0 + end end |