mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 11:25:55 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user