diff options
Diffstat (limited to 'test/functional')
-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 |