diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-23 17:02:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-23 17:02:54 +0200 |
commit | 42cc508a5d9b018d5a93649f54150d4446922b6c (patch) | |
tree | 2a43c559a078d0ae72d1e278b985b60aa5c5b104 /spec | |
parent | 31cf61bea4426c73199f505c6ccec03c155c4c27 (diff) | |
download | prosody-42cc508a5d9b018d5a93649f54150d4446922b6c.tar.gz prosody-42cc508a5d9b018d5a93649f54150d4446922b6c.zip |
util.serialization: Use deserialize instead of envload directly
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_serialization_spec.lua | 6 |
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({}); |