mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 06:15:59 +01:00
Add basic test for image view (#22482).
Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@15396 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -189,6 +189,15 @@ class AttachmentsControllerTest < ActionController::TestCase
|
|||||||
set_tmp_attachments_directory
|
set_tmp_attachments_directory
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_show_image
|
||||||
|
@request.session[:user_id] = 2
|
||||||
|
get :show, :id => 16
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'image'
|
||||||
|
assert_equal 'text/html', @response.content_type
|
||||||
|
assert_select 'img.filecontent', :src => attachments(:attachments_010).filename
|
||||||
|
end
|
||||||
|
|
||||||
def test_show_other
|
def test_show_other
|
||||||
get :show, :id => 6
|
get :show, :id => 6
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|||||||
Reference in New Issue
Block a user