Private issues (#7414).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5466 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-04-15 13:23:13 +00:00
parent 37205a8991
commit f16cddd57a
18 changed files with 178 additions and 14 deletions

View File

@@ -86,6 +86,18 @@ class AttachmentsControllerTest < ActionController::TestCase
assert_equal 'application/octet-stream', @response.content_type
end
def test_show_file_from_private_issue_without_permission
get :show, :id => 15
assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fattachments%2F15'
end
def test_show_file_from_private_issue_with_permission
@request.session[:user_id] = 2
get :show, :id => 15
assert_response :success
assert_tag 'h2', :content => /private.diff/
end
def test_download_text_file
get :download, :id => 4
assert_response :success