diff options
-rw-r--r-- | actionpack/test/dispatch/live_response_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/live_response_test.rb b/actionpack/test/dispatch/live_response_test.rb index 0e8dcc6a16..70dd7524aa 100644 --- a/actionpack/test/dispatch/live_response_test.rb +++ b/actionpack/test/dispatch/live_response_test.rb @@ -29,6 +29,17 @@ module ActionController @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 |