Software /
code /
prosody
Diff
spec/util_dataforms_spec.lua @ 11878:bf6706057283
util.dataforms: Turn number values into timestamps for datetime fields
Makes it symmetric with parsing.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Oct 2021 15:17:49 +0200 |
parent | 11877:593b141ba01c |
child | 11879:b8b889ba8d27 |
line wrap: on
line diff
--- a/spec/util_dataforms_spec.lua Tue Oct 26 15:15:57 2021 +0200 +++ b/spec/util_dataforms_spec.lua Tue Oct 26 15:17:49 2021 +0200 @@ -461,7 +461,7 @@ local f = dataforms.new { { name = "when"; type = "text-single"; datatype = "xs:dateTime" } } -- luacheck: ignore 431 it("works", function () - local x = f:form({ when = "2008-08-22T21:09:00Z" }); + local x = f:form({ when = 1219439340 }); assert.equal("2008-08-22T21:09:00Z", x:find("field/value#")) local d, e = f:data(x); assert.is_nil(e);