Skip to content

Commit

Permalink
Add a unit test to ensure Luvent does not remove disabled actions
Browse files Browse the repository at this point in the history
We want to leave the disabled actions in the event, otherwise we would
not be able to re-enable them later.
  • Loading branch information
Eric James Michael Ritz committed Sep 3, 2013
1 parent 310fc2c commit 51ee84c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Luvent.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ describe("Basic action management", function ()
assert.spy(noop).was_called(2)
end)

it("Does not remove disabled actions", function ()
event:addAction(noop)
event:addAction(echo)
assert.are.equal(event:getActionCount(), 2)

event:disableAction(noop)
assert.are.equal(event:getActionCount(), 2)

event:enableAction(noop)
assert.are.equal(event:getActionCount(), 2)
end)

end)

end)
Expand Down

0 comments on commit 51ee84c

Please sign in to comment.