From 80ba11a02944a675c44fa1e0f89729f86d502850 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 8 Jun 2014 04:01:28 +0000 Subject: [PATCH] add test of attachment thumbnail etag git-svn-id: http://svn.redmine.org/redmine/trunk@13175 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/attachments_controller_test.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 87bddb4a2..068d84321 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -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 -- 2.39.5