Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure appropriate headers are set and deleted

  • Loading branch information...
commit 01b812672a3ef6f1032bfff5e818f1ad8957e378 1 parent af0a9f9
Aaron Patterson tenderlove authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 actionpack/test/dispatch/live_response_test.rb
11 actionpack/test/dispatch/live_response_test.rb
View
@@ -29,6 +29,17 @@ def test_setting_body_populates_buffer
@response.close
assert_equal ['omg'], @response.body_parts
end
+
+ def test_cache_control_is_set
+ @response.stream.write 'omg'
+ assert_equal 'no-cache', @response.headers['Cache-Control']
+ end
+
+ def test_content_length_is_removed
+ @response.headers['Content-Length'] = "1234"
+ @response.stream.write 'omg'
+ assert_nil @response.headers['Content-Length']
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.