aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_dataforms_spec.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-16 02:02:47 +0100
committerKim Alvefur <zash@zash.se>2019-12-16 02:02:47 +0100
commit6b533ad772fb32d00a2f87cb53a87ee9f3a6d689 (patch)
tree34c949dd25a446d842dc7afe43a175601b49a787 /spec/util_dataforms_spec.lua
parent62971ce69b890efea8e9d5469fd45a6d1eec236e (diff)
downloadprosody-6b533ad772fb32d00a2f87cb53a87ee9f3a6d689.tar.gz
prosody-6b533ad772fb32d00a2f87cb53a87ee9f3a6d689.zip
util.dataforms: Improve descriptions in tests
Diffstat (limited to 'spec/util_dataforms_spec.lua')
-rw-r--r--spec/util_dataforms_spec.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/util_dataforms_spec.lua b/spec/util_dataforms_spec.lua
index 89759035..085128d1 100644
--- a/spec/util_dataforms_spec.lua
+++ b/spec/util_dataforms_spec.lua
@@ -110,7 +110,7 @@ describe("util.dataforms", function ()
xform = some_form:form();
end);
- it("works", function ()
+ it("XML serialization looks like it should", function ()
assert.truthy(xform);
assert.truthy(st.is_stanza(xform));
assert.equal("x", xform.name);
@@ -316,7 +316,7 @@ describe("util.dataforms", function ()
end);
describe(":data", function ()
- it("works", function ()
+ it("returns something", function ()
assert.truthy(some_form:data(xform));
end);
end);
@@ -402,7 +402,7 @@ describe("util.dataforms", function ()
end);
end);
- describe("validation", function ()
+ describe("datatype validation", function ()
local f = dataforms.new {
{
name = "number",
@@ -411,12 +411,12 @@ describe("util.dataforms", function ()
},
};
- it("works", function ()
+ it("integer roundtrip works", function ()
local d = f:data(f:form({number = 1}));
assert.equal(1, d.number);
end);
- it("works", function ()
+ it("integer error handling works", function ()
local d,e = f:data(f:form({number = "nan"}));
assert.not_equal(1, d.number);
assert.table(e);