aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_dataforms_spec.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-10-26 15:17:49 +0200
committerKim Alvefur <zash@zash.se>2021-10-26 15:17:49 +0200
commitf956b07ca0480883c7a050d190b8bc6b1a509d85 (patch)
tree7bffc34930b1ba976bd0411ffab1bf56a409f562 /spec/util_dataforms_spec.lua
parentfc677f515fd0fe5c45d54e51f5646f37e204929a (diff)
downloadprosody-f956b07ca0480883c7a050d190b8bc6b1a509d85.tar.gz
prosody-f956b07ca0480883c7a050d190b8bc6b1a509d85.zip
util.dataforms: Turn number values into timestamps for datetime fields
Makes it symmetric with parsing.
Diffstat (limited to 'spec/util_dataforms_spec.lua')
-rw-r--r--spec/util_dataforms_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/util_dataforms_spec.lua b/spec/util_dataforms_spec.lua
index a76a9565..16fffb42 100644
--- a/spec/util_dataforms_spec.lua
+++ b/spec/util_dataforms_spec.lua
@@ -461,7 +461,7 @@ describe("util.dataforms", function ()
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);