1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-20 10:32:01 +00:00

add test of attachment thumbnail etag

git-svn-id: http://svn.redmine.org/redmine/trunk@13175 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-06-08 04:01:28 +00:00
parent dfa40b732e
commit 80ba11a029

View File

@ -291,10 +291,16 @@ class AttachmentsControllerTest < ActionController::TestCase
def test_thumbnail
Attachment.clear_thumbnails
@request.session[:user_id] = 2
get :thumbnail, :id => 16
assert_response :success
assert_equal 'image/png', response.content_type
etag = @response.etag
assert_not_nil etag
@request.env["HTTP_IF_NONE_MATCH"] = etag
get :thumbnail, :id => 16
assert_response 304
end
def test_thumbnail_should_not_exceed_maximum_size