aboutsummaryrefslogtreecommitdiffstats
path: root/test/plum/client/test_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/plum/client/test_response.rb')
-rw-r--r--test/plum/client/test_response.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/plum/client/test_response.rb b/test/plum/client/test_response.rb
index 553bf45..76d9037 100644
--- a/test/plum/client/test_response.rb
+++ b/test/plum/client/test_response.rb
@@ -60,4 +60,15 @@ class ResponseTest < Minitest::Test
resp._chunk("c")
assert_equal(["a", "b", "c"], res)
end
+
+ def test_on_finish
+ resp = Response.new
+ ran = false
+ resp.on_finish { ran = true }
+ resp._finish
+ assert(ran)
+ ran = false
+ resp.on_finish { ran = true }
+ assert(ran)
+ end
end