Permalink
Browse files

Add specs for request finishing.

  • Loading branch information...
1 parent ac2a0f7 commit 73b2bc82f95657f940de76b82d1111d6078c8ade @piotrmurach committed Jun 30, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 spec/cookie_limiter_spec.rb
View
15 spec/cookie_limiter_spec.rb
@@ -70,6 +70,21 @@
head '/'
last_response.should be_ok
end
+
+ it "strips content headers for no content" do
+ mock_app with_status(204)
+ get '/'
+ last_response.headers['Content-Type'].should be_nil
+ last_response.headers['Content-Length'].should be_nil
+ last_response.body.should be_empty
+ end
+
+ it "strips headers for information request" do
+ mock_app with_status(102)
+ get '/'
+ last_response.headers['Content-Length'].should be_nil
+ last_response.body.should be_empty
+ end
end
end # Rack::Policy::CookieLimiter

0 comments on commit 73b2bc8

Please sign in to comment.