@@ -291,10 +291,16 class AttachmentsControllerTest < ActionController::TestCase | |||
|
291 | 291 | def test_thumbnail |
|
292 | 292 | Attachment.clear_thumbnails |
|
293 | 293 | @request.session[:user_id] = 2 |
|
294 | ||
|
295 | 294 | get :thumbnail, :id => 16 |
|
296 | 295 | assert_response :success |
|
297 | 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 | 304 | end |
|
299 | 305 | |
|
300 | 306 | def test_thumbnail_should_not_exceed_maximum_size |
General Comments 0
You need to be logged in to leave comments.
Login now