Mercurial > prosody-hg
comparison spec/util_pubsub_spec.lua @ 10411:db2a06b9ff98
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 16 Nov 2019 16:52:31 +0100 |
| parents | 0a2d7efca039 |
| children | 6c6ff4509082 |
comparison
equal
deleted
inserted
replaced
| 10410:659b577f280c | 10411:db2a06b9ff98 |
|---|---|
| 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); |
