# HG changeset patch # User Kim Alvefur # Date 1576458167 -3600 # Node ID 3089086d31fa0c632569a26f2b2fb24bc1be45a9 # Parent f89dbf7d03b8014bd4a0ebc1e7adddf46702369b util.dataforms: Improve descriptions in tests diff -r f89dbf7d03b8 -r 3089086d31fa spec/util_dataforms_spec.lua --- a/spec/util_dataforms_spec.lua Mon Dec 16 01:52:56 2019 +0100 +++ b/spec/util_dataforms_spec.lua Mon Dec 16 02:02:47 2019 +0100 @@ -110,7 +110,7 @@ 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 @@ end); describe(":data", function () - it("works", function () + it("returns something", function () assert.truthy(some_form:data(xform)); end); end); @@ -402,7 +402,7 @@ end); end); - describe("validation", function () + describe("datatype validation", function () local f = dataforms.new { { name = "number", @@ -411,12 +411,12 @@ }, }; - 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);