Diff

spec/util_datamapper_spec.lua @ 11458:0e00fa518688

util.datamapper: Limited support for unparsing simple arrays of strings
author Kim Alvefur <zash@zash.se>
date Thu, 18 Mar 2021 13:07:10 +0100
parent 11457:6a51749af7f4
child 11462:d1982b7eb00d
line wrap: on
line diff
--- a/spec/util_datamapper_spec.lua	Thu Mar 18 12:57:25 2021 +0100
+++ b/spec/util_datamapper_spec.lua	Thu Mar 18 13:07:10 2021 +0100
@@ -103,15 +103,11 @@
 			assert.same(x:get_child("delay", "urn:xmpp:delay").attr, u:get_child("delay", "urn:xmpp:delay").attr);
 			assert.same(x:get_child("origin-id", "urn:xmpp:sid:0").attr, u:get_child("origin-id", "urn:xmpp:sid:0").attr);
 			for _, tag in ipairs(x.tags) do
-				if tag.name ~= "UNRELATED" and tag.name ~= "reactions" then
+				if tag.name ~= "UNRELATED" then
 					assert.truthy(u:get_child(tag.name, tag.attr.xmlns) or u:get_child(tag.name), tag:top_tag())
 				end
 			end
-			assert.equal(#x.tags-2, #u.tags)
-
-			pending("arrays", function ()
-				assert.truthy(u:get_child("reactions", "urn:xmpp:reactions:0"))
-			end);
+			assert.equal(#x.tags-1, #u.tags)
 
 		end);
 	end);