aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-09-26 18:15:49 +0200
committerKim Alvefur <zash@zash.se>2020-09-26 18:15:49 +0200
commita51d5912465d8129ab062572d1f2e2bdddf967e6 (patch)
treecc9986d335559d38966ce073f7b6e3ca32848b2b /spec
parent3c7cbd0e2cbf471addcc332f2a8ba5cd635ae845 (diff)
downloadprosody-a51d5912465d8129ab062572d1f2e2bdddf967e6.tar.gz
prosody-a51d5912465d8129ab062572d1f2e2bdddf967e6.zip
util.error: Collect Application-Specific Conditions from stanza errors
Diffstat (limited to 'spec')
-rw-r--r--spec/util_error_spec.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/util_error_spec.lua b/spec/util_error_spec.lua
index 9cb1c57b..bb85d303 100644
--- a/spec/util_error_spec.lua
+++ b/spec/util_error_spec.lua
@@ -48,13 +48,14 @@ describe("util.error", function ()
it("works", function ()
local st = require "util.stanza";
local m = st.message({ type = "chat" });
- local e = st.error_reply(m, "modify", "bad-request", nil, "error.example");
+ local e = st.error_reply(m, "modify", "bad-request", nil, "error.example"):tag("extra", { xmlns = "xmpp:example.test" });
local err = errors.from_stanza(e);
assert.truthy(errors.is_err(err));
assert.equal("modify", err.type);
assert.equal("bad-request", err.condition);
assert.equal(e, err.context.stanza);
assert.equal("error.example", err.context.by);
+ assert.not_nil(err.extra.tag);
end);
end);