about summary refs log tree commit homepage
path: root/test/test_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_response.rb')
-rw-r--r--test/test_response.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_response.rb b/test/test_response.rb
index 3feb5e9..3c611d2 100644
--- a/test/test_response.rb
+++ b/test/test_response.rb
@@ -28,6 +28,7 @@ class TestSession < Test::Unit::TestCase
     assert_nothing_raised { body.each { |chunk| tmp << chunk.dup } }
     assert_equal [], tmp
     assert @response.parser.keepalive?
+    assert @response.parser.body_eof?
     body.close
 
     status, headers, body = @response.rack
@@ -135,6 +136,8 @@ class TestSession < Test::Unit::TestCase
     tmp = []
     assert body.parser.keepalive?
     assert_nothing_raised { body.each { |chunk| tmp << chunk.dup } }
+    assert body.parser.body_eof?
+    assert body.parser.keepalive?
     assert_equal [ "HI" ], tmp
     _, status = Process.waitpid2(pid)
     assert status.success?
@@ -171,6 +174,8 @@ class TestSession < Test::Unit::TestCase
     tmp = []
     assert body.parser.keepalive?
     assert_nothing_raised { body.each { |chunk| tmp << chunk.dup } }
+    assert body.parser.keepalive?
+    assert body.parser.body_eof?
     assert_equal [ "abcde" ], tmp
     _, status = Process.waitpid2(pid)
     assert status.success?