Diff

spec/util_datamapper_spec.lua @ 12581:6ee9071c0a1f

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 08 Jul 2022 19:36:07 +0200
parent 12580:a9dbf657c894
child 12818:74ed772ff5fb
line wrap: on
line diff
--- a/spec/util_datamapper_spec.lua	Sat Jul 02 17:27:39 2022 +0200
+++ b/spec/util_datamapper_spec.lua	Fri Jul 08 19:36:07 2022 +0200
@@ -25,7 +25,7 @@
 				from = attr();
 				type = attr();
 				id = attr();
-				body = "string";
+				body = true; -- should be assumed to be a string
 				lang = {type = "string"; xml = {attribute = true; prefix = "xml"}};
 				delay = {
 					type = "object";
@@ -56,7 +56,8 @@
 					xml = {namespace = "urn:xmpp:reactions:0"; name = "reactions"};
 					properties = {
 						to = {type = "string"; xml = {attribute = true; name = "id"}};
-						reactions = {type = "array"; items = {type = "string"; xml = {name = "reaction"}}};
+						-- should be assumed to be array since it has 'items'
+						reactions = { items = { xml = { name = "reaction" } } };
 					};
 				};
 				stanza_ids = {
@@ -190,7 +191,8 @@
 					version = {
 						type = "object";
 						xml = {name = "query"; namespace = "jabber:iq:version"};
-						properties = {name = "string"; version = "string"; os = "string"};
+						-- properties should be assumed to be strings
+						properties = {name = true; version = {}; os = {}};
 					};
 				};
 			};