util.error: Add test for #1805
authorKim Alvefur <zash@zash.se>
Wed, 19 Apr 2023 12:03:34 +0200
changeset 13084 031382b207ec
parent 13083 e7a5e5a0dc02
child 13085 adc688a0b31a
util.error: Add test for #1805 Checks that it doesn't fail on a stanza without <error> tag
spec/util_error_spec.lua
--- a/spec/util_error_spec.lua	Wed Apr 19 11:42:36 2023 +0200
+++ b/spec/util_error_spec.lua	Wed Apr 19 12:03:34 2023 +0200
@@ -56,6 +56,9 @@
 			assert.equal(e, err.context.stanza);
 			assert.equal("error.example", err.context.by);
 			assert.not_nil(err.extra.tag);
+			assert.not_has_error(function ()
+				errors.from_stanza(st.message())
+			end);
 		end);
 	end);