util.dataforms: Include a fixed field in test
authorKim Alvefur <zash@zash.se>
Sun, 15 Jul 2018 22:35:42 +0200
changeset 9049 7cdc718312c8
parent 9048 4336a2b97aba
child 9050 ab3488ee3ca5
util.dataforms: Include a fixed field in test
spec/util_dataforms_spec.lua
--- a/spec/util_dataforms_spec.lua	Sat Jul 14 21:34:22 2018 +0200
+++ b/spec/util_dataforms_spec.lua	Sun Jul 15 22:35:42 2018 +0200
@@ -15,6 +15,10 @@
 				value = "xmpp:prosody.im/spec/util.dataforms#1",
 			};
 			{
+				type = "fixed";
+				value = "Fixed field";
+			},
+			{
 				type = "boolean",
 				label = "boolean-label",
 				name = "boolean-field",
@@ -310,5 +314,11 @@
 			assert.equal("xmpp:prosody.im/spec/util.dataforms#1", dataforms.get_type(xform));
 		end);
 	end);
+
+	describe(":data", function ()
+		it("works", function ()
+			assert.truthy(some_form:data(xform));
+		end);
+	end);
 end);