aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_promise_spec.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-18 12:03:33 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-18 12:03:33 +0100
commit08adc56f45fdebd59f7676cfeb788d09543e1c9e (patch)
tree72ea46560789eb48b9d5958042fbd30a036867ca /spec/util_promise_spec.lua
parent4e79f05c854857d4ddf0baeba0a4b25a65bd650c (diff)
downloadprosody-08adc56f45fdebd59f7676cfeb788d09543e1c9e.tar.gz
prosody-08adc56f45fdebd59f7676cfeb788d09543e1c9e.zip
util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it
Diffstat (limited to 'spec/util_promise_spec.lua')
-rw-r--r--spec/util_promise_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/util_promise_spec.lua b/spec/util_promise_spec.lua
index d9cb235e..ae3df29f 100644
--- a/spec/util_promise_spec.lua
+++ b/spec/util_promise_spec.lua
@@ -253,7 +253,7 @@ describe("util.promise", function ()
it("returns a rejected promise", function ()
local p = promise.reject("foo");
local cb = spy.new(function () end);
- p:next(cb);
+ p:catch(cb);
assert.spy(cb).was_called(1);
assert.spy(cb).was_called_with("foo");
end);