Software /
code /
prosody
Comparison
spec/util_error_spec.lua @ 13080:031382b207ec
util.error: Add test for #1805
Checks that it doesn't fail on a stanza without <error> tag
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 19 Apr 2023 12:03:34 +0200 |
parent | 11221:b0a563716334 |
comparison
equal
deleted
inserted
replaced
13079:e7a5e5a0dc02 | 13080:031382b207ec |
---|---|
54 assert.equal("modify", err.type); | 54 assert.equal("modify", err.type); |
55 assert.equal("bad-request", err.condition); | 55 assert.equal("bad-request", err.condition); |
56 assert.equal(e, err.context.stanza); | 56 assert.equal(e, err.context.stanza); |
57 assert.equal("error.example", err.context.by); | 57 assert.equal("error.example", err.context.by); |
58 assert.not_nil(err.extra.tag); | 58 assert.not_nil(err.extra.tag); |
59 assert.not_has_error(function () | |
60 errors.from_stanza(st.message()) | |
61 end); | |
59 end); | 62 end); |
60 end); | 63 end); |
61 | 64 |
62 describe("__tostring", function () | 65 describe("__tostring", function () |
63 it("doesn't throw", function () | 66 it("doesn't throw", function () |