Software /
code /
prosody
Diff
spec/util_stanza_spec.lua @ 11084:5e09a3389adb
util.stanza: Support inclusion of <gone> URI from util.error object
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Sep 2020 17:30:47 +0200 |
parent | 11083:4d12a6785531 |
child | 11085:5705d151ea11 |
line wrap: on
line diff
--- a/spec/util_stanza_spec.lua Sat Sep 26 17:26:31 2020 +0200 +++ b/spec/util_stanza_spec.lua Sat Sep 26 17:30:47 2020 +0200 @@ -247,6 +247,11 @@ 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);