diff options
Diffstat (limited to 'spec/util_pubsub_spec.lua')
-rw-r--r-- | spec/util_pubsub_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/util_pubsub_spec.lua b/spec/util_pubsub_spec.lua index 5ee5a14b..d63e2206 100644 --- a/spec/util_pubsub_spec.lua +++ b/spec/util_pubsub_spec.lua @@ -124,6 +124,24 @@ describe("util.pubsub", function () end); + describe("node config", function () + local service; + before_each(function () + service = pubsub.new(); + service:create("test", true); + end); + it("access is forbidden for unaffiliated entities", function () + local ok, err = service:get_node_config("test", "stranger"); + assert.is_falsy(ok); + assert.equals("forbidden", err); + end); + it("returns an error for nodes that do not exist", function () + local ok, err = service:get_node_config("nonexistent", true); + assert.is_falsy(ok); + assert.equals("item-not-found", err); + end); + end); + describe("access model", function () describe("open", function () local service; |