diff options
author | Kim Alvefur <zash@zash.se> | 2020-05-29 17:53:00 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-05-29 17:53:00 +0200 |
commit | 838f8ebd5bb26c2c96644af9e4f80ea7e150d976 (patch) | |
tree | 27fe95e5b4e75623d91a0afe754eb75efa3d1d24 | |
parent | 19b7e38e1c80c4f9a8623877d36bbe4c5251c696 (diff) | |
download | prosody-838f8ebd5bb26c2c96644af9e4f80ea7e150d976.tar.gz prosody-838f8ebd5bb26c2c96644af9e4f80ea7e150d976.zip |
util.ringbuffer: Add some initial tests
-rw-r--r-- | spec/util_ringbuffer_spec.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/util_ringbuffer_spec.lua b/spec/util_ringbuffer_spec.lua new file mode 100644 index 00000000..5d63b24b --- /dev/null +++ b/spec/util_ringbuffer_spec.lua @@ -0,0 +1,17 @@ +local rb = require "util.ringbuffer"; +describe("util.ringbuffer", function () + describe("#new", function () + it("has a constructor", function () + assert.Function(rb.new); + end); + it("can be created", function () + assert.truthy(rb.new()); + end); + end); + describe(":write", function () + local b = rb.new(); + it("works", function () + assert.truthy(b:write("hi")); + end); + end); +end); |