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:
parent
dfa40b732e
commit
80ba11a029
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user