util.stanza: Support inclusion of <gone> URI from util.error object

This commit is contained in:
Kim Alvefur 2020-09-26 17:30:47 +02:00
parent 2f0b85ce29
commit 3f9988468d
2 changed files with 13 additions and 2 deletions

View file

@ -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);