diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-23 14:22:01 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-23 14:22:01 +0000 |
commit | bd3df4fa36552931b3a46a607365e7ae8fb70442 (patch) | |
tree | bd680ccb362413e1f653a1d4f4ae89db6192b70e /spec/util_async_spec.lua | |
parent | 6105bc5d3481d55e5d7d08655270b22b154b5089 (diff) | |
download | prosody-bd3df4fa36552931b3a46a607365e7ae8fb70442.tar.gz prosody-bd3df4fa36552931b3a46a607365e7ae8fb70442.zip |
util.async: Remove async.once(), can now be replaced by runner():run(func)
Diffstat (limited to 'spec/util_async_spec.lua')
-rw-r--r-- | spec/util_async_spec.lua | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/spec/util_async_spec.lua b/spec/util_async_spec.lua index d81b18b5..d2de8c94 100644 --- a/spec/util_async_spec.lua +++ b/spec/util_async_spec.lua @@ -613,23 +613,4 @@ describe("util.async", function() assert.spy(r.watchers.error).was_not.called(); end); end); - - describe("#once()", function () - it("should work", function () - local f = spy.new(function () - assert.truthy(async.ready()); - end); - async.once(f); - assert.spy(f).was.called(); - assert.spy(f).was.called_with(); - end); - it("should propagate errors", function () - local function should_error() - async.once(function () - error("hello world"); - end); - end; - assert.error_matches(should_error, "hello world"); - end); - end); end); |