diff --git a/spec/tiny_spec.lua b/spec/tiny_spec.lua index 40660ae..23bba4b 100644 --- a/spec/tiny_spec.lua +++ b/spec/tiny_spec.lua @@ -179,6 +179,24 @@ describe('tiny-ecs:', function() assert.equals(0, world:getEntityCount()) end) + it("Add Systems Multiple Times", function() + world:update(1) + world:add(moveSystem, oneTimeSystem) + world:update(2) + assert.equals(2, world:getSystemCount()) + assert.equals(3, world:getEntityCount()) + end) + + it("Remove Systems Multiple Times", function() + world:update(1) + world:remove(moveSystem) + world:update(2) + world:remove(moveSystem) + world:update(2) + assert.equals(1, world:getSystemCount()) + assert.equals(3, world:getEntityCount()) + end) + end) end)