Skip to content

Commit

Permalink
Add a test showing it is ok to trigger an event with no actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric James Michael Ritz committed Sep 9, 2013
1 parent 3ffa82d commit 79a36a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Luvent.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ describe("Triggering events", function ()
button = { clickCount = 0, label = "" }
end)

it("Allows triggering an event with no actions", function ()
assert.are.equal(onClickEvent:getActionCount(), 0)
assert.has_no.errors(function () onClickEvent:trigger() end)
end)

it("Calls actions that take no arguments", function ()
local noop = spy.new(function () end)

Expand Down

0 comments on commit 79a36a7

Please sign in to comment.