mirror of
https://github.com/redmine/redmine.git
synced 2026-03-11 23:20:52 +01:00
Force format to html for the download_named_attachment route (#42394).
Patch by Jens Krämer (user:jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@23581 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -267,6 +267,16 @@ class AttachmentsTest < Redmine::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_unauthorized_named_download_link_should_redirect_to_login
|
||||
with_settings login_required: '1' do
|
||||
get "/attachments/download/1"
|
||||
assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fattachments%2Fdownload%2F1"
|
||||
|
||||
get "/attachments/download/1/error281.txt"
|
||||
assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fattachments%2Fdownload%2F1%2Ferror281.txt"
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ajax_upload(filename, content, attachment_id=1)
|
||||
|
||||
Reference in New Issue
Block a user