aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-23 17:02:54 +0200
committerKim Alvefur <zash@zash.se>2018-09-23 17:02:54 +0200
commitbc9509b4a99d2be656f10aa7d2dc2fe63a615320 (patch)
tree2a43c559a078d0ae72d1e278b985b60aa5c5b104 /spec
parent8e2bcbbb95962fc3808b52004641ffbda9fed050 (diff)
downloadprosody-bc9509b4a99d2be656f10aa7d2dc2fe63a615320.tar.gz
prosody-bc9509b4a99d2be656f10aa7d2dc2fe63a615320.zip
util.serialization: Use deserialize instead of envload directly
Diffstat (limited to 'spec')
-rw-r--r--spec/util_serialization_spec.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/util_serialization_spec.lua b/spec/util_serialization_spec.lua
index 18e6ca68..f50bdf23 100644
--- a/spec/util_serialization_spec.lua
+++ b/spec/util_serialization_spec.lua
@@ -1,5 +1,4 @@
local serialization = require "util.serialization";
-local envload = require "util.envload";
describe("util.serialization", function ()
describe("serialize", function ()
@@ -15,9 +14,8 @@ describe("util.serialization", function ()
local function test(data)
local serialized = serialization.serialize(data);
assert.is_string(serialized);
- local chunk, err = envload.envload("return ("..serialized..");");
- assert.is_function(chunk, err);
- assert.same(data, chunk());
+ local deserialized, err = serialization.deserialize(serialized);
+ assert.same(data, deserialized, err);
end
test({});