diff options
author | Kim Alvefur <zash@zash.se> | 2020-09-26 18:13:27 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-09-26 18:13:27 +0200 |
commit | aba41217c99b08a2c64b2177a33c03fa73d0f29e (patch) | |
tree | ecde3fd50818d213291123221a1463e4de9d32e5 /spec | |
parent | 6674d10a2294a7f767fcdd0fbffe01060d522b32 (diff) | |
download | prosody-aba41217c99b08a2c64b2177a33c03fa73d0f29e.tar.gz prosody-aba41217c99b08a2c64b2177a33c03fa73d0f29e.zip |
util.error: Extract error originator from stanza errors
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_error_spec.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/util_error_spec.lua b/spec/util_error_spec.lua index 136f8b12..9cb1c57b 100644 --- a/spec/util_error_spec.lua +++ b/spec/util_error_spec.lua @@ -48,12 +48,13 @@ 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"); + local e = st.error_reply(m, "modify", "bad-request", nil, "error.example"); 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); end); end); |