Comparison

spec/util_throttle_spec.lua @ 8473:f024cb5acc25

util_throttle_spec: Fix minor typo in test title
author Waqas Hussain <waqas20@gmail.com>
date Thu, 21 Dec 2017 12:22:46 -0500
parent 8246:ea2667fc6781
child 9993:02a41315d275
comparison
equal deleted inserted replaced
8472:d88dc6827675 8473:f024cb5acc25
32 assert.same(a, { balance = 10, max = 10, rate = 10, t = 5 }); 32 assert.same(a, { balance = 10, max = 10, rate = 10, t = 5 });
33 end); 33 end);
34 end); 34 end);
35 35
36 describe("#update()", function() 36 describe("#update()", function()
37 it("does nothing when no time hase passed, even if balance is not full", function() 37 it("does nothing when no time has passed, even if balance is not full", function()
38 now = 5; 38 now = 5;
39 local a = throttle.create(10, 10); 39 local a = throttle.create(10, 10);
40 for i=1,5 do 40 for i=1,5 do
41 a:update(); 41 a:update();
42 assert.same(a, { balance = 10, max = 10, rate = 1, t = 5 }); 42 assert.same(a, { balance = 10, max = 10, rate = 1, t = 5 });