author | Matthew Wild <mwild1@gmail.com> |
Thu, 18 Oct 2018 12:04:14 +0100 | |
changeset 9514 | cb88d729e98d |
parent 9513 | 8ef46d09386a |
child 9515 | 439cf3bbe5f3 |
--- a/spec/util_promise_spec.lua Thu Oct 18 12:03:33 2018 +0100 +++ b/spec/util_promise_spec.lua Thu Oct 18 12:04:14 2018 +0100 @@ -257,5 +257,11 @@ assert.spy(cb).was_called(1); assert.spy(cb).was_called_with("foo"); end); + it("returns a rejected promise and does not call on_fulfilled", function () + local p = promise.reject("foo"); + local cb = spy.new(function () end); + p:next(cb); + assert.spy(cb).was_called(0); + end); end); end);