Skip to content

Commit

Permalink
Closes Kong#196
Browse files Browse the repository at this point in the history
Former-commit-id: d95b879416009ad65a78c43d5c4cec87d8f1345b
  • Loading branch information
subnetmarco committed May 27, 2015
1 parent 4e64847 commit 24d982a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/unit/tools/timestamp_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ describe("Timestamp", function()
end)

it("should give the same timestamps table for the same time", function()
-- Wait til the beginning of a new second before starting the test
-- to avoid ending up in an edge case when the second is about to end
local now = os.time()
while os.time() < now + 1 do
-- Nothing
end

local timestamps_one = timestamp.get_timestamps()
local timestamps_two = timestamp.get_timestamps(timestamp.get_utc())
assert.truthy(timestamps_one)
Expand Down

0 comments on commit 24d982a

Please sign in to comment.