mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 01:06:00 +01:00
Test for r18158 (#22481).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18159 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -404,6 +404,16 @@ class AttachmentsControllerTest < Redmine::ControllerTest
|
||||
assert_response 304
|
||||
end
|
||||
|
||||
def test_thumbnail_for_pdf_should_be_png
|
||||
Attachment.clear_thumbnails
|
||||
@request.session[:user_id] = 2
|
||||
get :thumbnail, :params => {
|
||||
:id => 23 # ecookbook-gantt.pdf
|
||||
}
|
||||
assert_response :success
|
||||
assert_equal 'image/png', response.content_type
|
||||
end
|
||||
|
||||
def test_thumbnail_should_not_exceed_maximum_size
|
||||
Redmine::Thumbnail.expects(:generate).with {|source, target, size| size == 800}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user