aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-22 16:31:05 +0200
committerKim Alvefur <zash@zash.se>2023-07-22 16:31:05 +0200
commita1f053229c1da8a0137e0d895f90b07eeb02ab91 (patch)
tree898c7fc5f6dd7b52edcc7810766c2c56f2ce7a70 /spec
parent8b013e947100887703b42e286a00917f8524841d (diff)
downloadprosody-a1f053229c1da8a0137e0d895f90b07eeb02ab91.tar.gz
prosody-a1f053229c1da8a0137e0d895f90b07eeb02ab91.zip
util.array: Fix new() library function
Diffstat (limited to 'spec')
-rw-r--r--spec/util_array_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/util_array_spec.lua b/spec/util_array_spec.lua
index ff049d0e..60c24753 100644
--- a/spec/util_array_spec.lua
+++ b/spec/util_array_spec.lua
@@ -1,6 +1,13 @@
local array = require "util.array";
describe("util.array", function ()
describe("creation", function ()
+ describe("new", function ()
+ it("works", function ()
+ local a = array.new({"a", "b", "c"});
+ assert.same({"a", "b", "c"}, a);
+ end);
+ end);
+
describe("from table", function ()
it("works", function ()
local a = array({"a", "b", "c"});