diff options
author | Kim Alvefur <zash@zash.se> | 2020-09-26 17:30:47 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-09-26 17:30:47 +0200 |
commit | 3f9988468d11d6e3b94fec0ec1ed4271712bed14 (patch) | |
tree | 8ce8d230407f3e6ea9bdb3896fba6e539779c643 /spec | |
parent | 2f0b85ce29a6b4eaa210a60a5d04610f0401379d (diff) | |
download | prosody-3f9988468d11d6e3b94fec0ec1ed4271712bed14.tar.gz prosody-3f9988468d11d6e3b94fec0ec1ed4271712bed14.zip |
util.stanza: Support inclusion of <gone> URI from util.error object
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_stanza_spec.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/util_stanza_spec.lua b/spec/util_stanza_spec.lua index ec392611..c4c1d174 100644 --- a/spec/util_stanza_spec.lua +++ b/spec/util_stanza_spec.lua @@ -247,6 +247,11 @@ describe("util.stanza", function() assert.are.equal(r.tags[1].tags[1].name, e.condition); assert.are.equal(r.tags[1].tags[2]:get_text(), e.text); assert.are.equal("this.test", r.tags[1].attr.by); + + local gone = errors.new({ condition = "gone", extra = { uri = "file:///dev/null" } }) + local gonner = st.error_reply(s, gone); + assert.are.equal("gone", gonner.tags[1].tags[1].name); + assert.are.equal("file:///dev/null", gonner.tags[1].tags[1][1]); end); end); |