diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-06-08 04:01:28 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-06-08 04:01:28 +0000 |
commit | 80ba11a02944a675c44fa1e0f89729f86d502850 (patch) | |
tree | 45944c40135d127b96d5ec7231d79a33bbb400a5 | |
parent | dfa40b732e5b5c13624293551a88fa50adb9e1e5 (diff) | |
download | redmine-80ba11a02944a675c44fa1e0f89729f86d502850.tar.gz redmine-80ba11a02944a675c44fa1e0f89729f86d502850.zip |
add test of attachment thumbnail etag
git-svn-id: http://svn.redmine.org/redmine/trunk@13175 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/attachments_controller_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |