Merged r15879 (#23969).

git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15889 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-10-08 07:05:15 +00:00
parent 9fa491f9f0
commit 52b19aca3c
3 changed files with 40 additions and 0 deletions

View File

@@ -1755,6 +1755,25 @@ class IssuesControllerTest < ActionController::TestCase
assert_response 404
end
def test_show_on_active_project_should_display_edit_links
@request.session[:user_id] = 1
get :show, :id => 1
assert_response :success
assert_select 'a', :text => 'Edit'
assert_select 'a', :text => 'Delete'
end
def test_show_on_closed_project_should_not_display_edit_links
Issue.find(1).project.close
@request.session[:user_id] = 1
get :show, :id => 1
assert_response :success
assert_select 'a', :text => 'Edit', :count => 0
assert_select 'a', :text => 'Delete', :count => 0
end
def test_get_new
@request.session[:user_id] = 2
get :new, :project_id => 1, :tracker_id => 1