mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
parent
a087cc40e8
commit
cdfd1d056a
1 changed files with 2 additions and 2 deletions
|
@ -13,10 +13,10 @@ describe LogStash::Timestamp do
|
|||
# we may need to use `be_within(0.000999999).of()` in other places too
|
||||
it "should work" do
|
||||
t = LogStash::Timestamp.new
|
||||
expect(t.time.to_i).to be_within(1).of Time.now.to_i
|
||||
expect(t.time.to_i).to be_within(2).of Time.now.to_i
|
||||
|
||||
t = LogStash::Timestamp.now
|
||||
expect(t.time.to_i).to be_within(1).of Time.now.to_i
|
||||
expect(t.time.to_i).to be_within(2).of Time.now.to_i
|
||||
|
||||
now = DateTime.now.to_time.utc
|
||||
t = LogStash::Timestamp.new(now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue