aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/util_dataforms_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/util_dataforms_spec.lua b/spec/util_dataforms_spec.lua
index 4b85444f..56751041 100644
--- a/spec/util_dataforms_spec.lua
+++ b/spec/util_dataforms_spec.lua
@@ -301,5 +301,14 @@ describe("util.dataforms", function ()
assert.equal("text-single-value", f:get_child_text("value"));
end);
+ describe("get_type()", function ()
+ it("identifes dataforms", function ()
+ assert.equal(nil, dataforms.get_type(nil));
+ assert.equal(nil, dataforms.get_type(""));
+ assert.equal(nil, dataforms.get_type({}));
+ assert.equal(nil, dataforms.get_type(st.stanza("no-a-form")));
+ assert.equal("xmpp:prosody.im/spec/util.dataforms#1", dataforms.get_type(xform));
+ end);
+ end);
end);