@@ -291,10 +291,16 class AttachmentsControllerTest < ActionController::TestCase | |||||
291 | def test_thumbnail |
|
291 | def test_thumbnail | |
292 | Attachment.clear_thumbnails |
|
292 | Attachment.clear_thumbnails | |
293 | @request.session[:user_id] = 2 |
|
293 | @request.session[:user_id] = 2 | |
294 |
|
||||
295 | get :thumbnail, :id => 16 |
|
294 | get :thumbnail, :id => 16 | |
296 | assert_response :success |
|
295 | assert_response :success | |
297 | assert_equal 'image/png', response.content_type |
|
296 | assert_equal 'image/png', response.content_type | |
|
297 | ||||
|
298 | etag = @response.etag | |||
|
299 | assert_not_nil etag | |||
|
300 | ||||
|
301 | @request.env["HTTP_IF_NONE_MATCH"] = etag | |||
|
302 | get :thumbnail, :id => 16 | |||
|
303 | assert_response 304 | |||
298 | end |
|
304 | end | |
299 |
|
305 | |||
300 | def test_thumbnail_should_not_exceed_maximum_size |
|
306 | def test_thumbnail_should_not_exceed_maximum_size |
General Comments 0
You need to be logged in to leave comments.
Login now