Mercurial > prosody-hg
comparison spec/util_pubsub_spec.lua @ 13536:272ea65c3087
util.pubsub: Fix test to account for not using util.error
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 29 Oct 2024 15:05:14 +0100 |
| parents | 26af75c20163 |
| children | 3b357ab6b6eb |
comparison
equal
deleted
inserted
replaced
| 13535:88cab98aa28c | 13536:272ea65c3087 |
|---|---|
| 106 end); | 106 end); |
| 107 | 107 |
| 108 it("fails to publish to a node with differing config", function () | 108 it("fails to publish to a node with differing config", function () |
| 109 local ok, err = service:publish("node", true, "1", "item 2", { myoption = false }); | 109 local ok, err = service:publish("node", true, "1", "item 2", { myoption = false }); |
| 110 assert.falsy(ok); | 110 assert.falsy(ok); |
| 111 assert.equals("precondition-not-met", err.pubsub_condition); | 111 assert.equals("precondition-not-met", err); |
| 112 end); | 112 end); |
| 113 | 113 |
| 114 it("allows to publish to a node with differing config when only defaults are suggested", function () | 114 it("allows to publish to a node with differing config when only defaults are suggested", function () |
| 115 assert(service:publish("node", true, "1", "item 2", { _defaults_only = true, myoption = false })); | 115 assert(service:publish("node", true, "1", "item 2", { _defaults_only = true, myoption = false })); |
| 116 end); | 116 end); |
