Software /
code /
prosody
Comparison
spec/util_pubsub_spec.lua @ 10356:0a2d7efca039
util.pubsub, pubsub.lib and tests: Add text to precondition-not-met error (fixes #1455)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 27 Oct 2019 14:45:57 +0000 |
parent | 9840:ec353524b739 |
child | 10541:6c6ff4509082 |
comparison
equal
deleted
inserted
replaced
10355:cb9755d7a36e | 10356:0a2d7efca039 |
---|---|
105 end); | 105 end); |
106 | 106 |
107 it("fails to publish to a node with differing config", function () | 107 it("fails to publish to a node with differing config", function () |
108 local ok, err = service:publish("node", true, "1", "item 2", { myoption = false }); | 108 local ok, err = service:publish("node", true, "1", "item 2", { myoption = false }); |
109 assert.falsy(ok); | 109 assert.falsy(ok); |
110 assert.equals("precondition-not-met", err); | 110 assert.equals("precondition-not-met", err.pubsub_condition); |
111 end); | 111 end); |
112 | 112 |
113 it("allows to publish to a node with differing config when only defaults are suggested", function () | 113 it("allows to publish to a node with differing config when only defaults are suggested", function () |
114 assert(service:publish("node", true, "1", "item 2", { _defaults_only = true, myoption = false })); | 114 assert(service:publish("node", true, "1", "item 2", { _defaults_only = true, myoption = false })); |
115 end); | 115 end); |