Permalink
Browse files

make sure appropriate headers are set and deleted

  • Loading branch information...
1 parent af0a9f9 commit 01b812672a3ef6f1032bfff5e818f1ad8957e378 @tenderlove tenderlove committed Jul 30, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 actionpack/test/dispatch/live_response_test.rb
@@ -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

0 comments on commit 01b8126

Please sign in to comment.