From dfa40b732e5b5c13624293551a88fa50adb9e1e5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 2 Jun 2014 17:03:08 +0000 Subject: add test of attachment download etag git-svn-id: http://svn.redmine.org/redmine/trunk@13174 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/attachments_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 1f014cda0..87bddb4a2 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -250,6 +250,13 @@ class AttachmentsControllerTest < ActionController::TestCase get :download, :id => 4 assert_response :success assert_equal 'application/x-ruby', @response.content_type + etag = @response.etag + assert_not_nil etag + + @request.env["HTTP_IF_NONE_MATCH"] = etag + get :download, :id => 4 + assert_response 304 + set_tmp_attachments_directory end -- cgit v1.2.3