[Groonga-commit] droonga/fluent-plugin-droonga at c71b3a8 [master] Add a test case for watch.unsubscribe

Back to archive index

Yoji Shidara null+****@clear*****
Tue Oct 15 14:45:39 JST 2013


Yoji Shidara	2013-10-15 14:45:39 +0900 (Tue, 15 Oct 2013)

  New Revision: c71b3a8681cef2d3d9e791519795045f97582487
  https://github.com/droonga/fluent-plugin-droonga/commit/c71b3a8681cef2d3d9e791519795045f97582487

  Message:
    Add a test case for watch.unsubscribe

  Modified files:
    test/plugin/handler/test_handler_watch.rb

  Modified: test/plugin/handler/test_handler_watch.rb (+28 -0)
===================================================================
--- test/plugin/handler/test_handler_watch.rb    2013-10-15 14:25:15 +0900 (f3439f8)
+++ test/plugin/handler/test_handler_watch.rb    2013-10-15 14:45:39 +0900 (f03e096)
@@ -93,4 +93,32 @@ class WatchHandlerTest < Test::Unit::TestCase
       @handler.subscribe(request)
     end
   end
+
+  class TestUnsubscribe < self
+    def setup
+      super
+      setup_subscription
+    end
+
+    def test_unsubscribe
+      request = {
+        "route" => "localhost:23003/output",
+        "condition" => "たいやき",
+        "subscriber" => "localhost"
+      }
+      mock(@handler).emit([true])
+      @handler.unsubscribe(request)
+    end
+
+    private
+    def setup_subscription
+      request = {
+        "route" => "localhost:23003/output",
+        "condition" => "たいやき",
+        "subscriber" => "localhost"
+      }
+      stub(@handler).emit([true])
+      @handler.subscribe(request)
+    end
+  end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index