summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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