aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/response
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/response')
-rw-r--r--spec/unit/response/response_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/response/response_spec.rb b/spec/unit/response/response_spec.rb
index 21d6e31..e58b0d0 100644
--- a/spec/unit/response/response_spec.rb
+++ b/spec/unit/response/response_spec.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
require 'spec_helper'
describe Zero::Response do
@@ -60,6 +61,13 @@ describe Zero::Response do
subject.header['Content-Length'].should eq(6)
end
+
+ it "sets the content_length to the bytesize of the message body" do
+ subject.body = ['föö', 'bär']
+ subject.content_length
+
+ subject.header['Content-Length'].should eq(9)
+ end
end
end \ No newline at end of file