summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2012-11-24 15:28:42 +0100
committerStormwind <stormwind@stormwinds-page.de>2012-11-24 15:28:42 +0100
commit5c45e1e20beeb33e3fef3a109ab7019e78d6c31b (patch)
tree58081ac474244cee9f5a220720974b4abea10f2b /spec/unit
parent285b7f221495b8d80e3921876a17eaff799c14b8 (diff)
Delete Content-Length. Conten-Type and body on status 304
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/response/response_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/response/response_spec.rb b/spec/unit/response/response_spec.rb
index 7a02ced..4b94dbe 100644
--- a/spec/unit/response/response_spec.rb
+++ b/spec/unit/response/response_spec.rb
@@ -56,6 +56,17 @@ describe Zero::Response do
value[1].should eq({}) # Headers
end
+
+ it "removes Content-Type, Content-Length and body on status code 304" do
+ subject.body.push '"foobar"'
+ subject.content_type 'application/json'
+ subject.header['Content-Length'] = 8
+
+ subject.status = 304
+ value = subject.to_a
+
+ value[1].should eq({}) # Headers
+ end
end
describe '#status' do