aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/util_pubsub_spec.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/util_pubsub_spec.lua b/spec/util_pubsub_spec.lua
index 3221ad6c..1c9a9e02 100644
--- a/spec/util_pubsub_spec.lua
+++ b/spec/util_pubsub_spec.lua
@@ -31,12 +31,24 @@ describe("util.pubsub", function ()
describe("simple publishing", function ()
local broadcaster = spy.new(function () end);
- local service = pubsub.new({ broadcaster = broadcaster; });
+ local service = pubsub.new({
+ broadcaster = broadcaster;
+ capabilities = {
+ none = {
+ subscribe = true;
+ be_subscribed = true;
+ };
+ }
+ });
it("creates a node", function ()
assert.truthy(service:create("node", true));
end);
+ it("lets someone subscribe", function ()
+ assert.truthy(service:add_subscription("node", true, "someone"));
+ end);
+
it("publishes an item", function ()
assert.truthy(service:publish("node", true, "1", "item 1"));
end);