summaryrefslogtreecommitdiffstats
path: root/test/functional/attachments_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-06-02 17:03:08 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-06-02 17:03:08 +0000
commitdfa40b732e5b5c13624293551a88fa50adb9e1e5 (patch)
tree9df13e7f7ff38de210d6477f7ced60a0e53bbd19 /test/functional/attachments_controller_test.rb
parentebb1a0092f91576647bec1238261382d57c14e15 (diff)
downloadredmine-dfa40b732e5b5c13624293551a88fa50adb9e1e5.tar.gz
redmine-dfa40b732e5b5c13624293551a88fa50adb9e1e5.zip
add test of attachment download etag
git-svn-id: http://svn.redmine.org/redmine/trunk@13174 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/attachments_controller_test.rb')
-rw-r--r--test/functional/attachments_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
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