Changeset

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
parents 13079:e7a5e5a0dc02
children 13081:adc688a0b31a
files spec/util_error_spec.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);