mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Slightly fix the timestamp tests.
This commit is contained in:
parent
2e8fcb4a76
commit
9fec000a29
1 changed files with 5 additions and 3 deletions
|
|
@ -577,13 +577,15 @@ module TestHTTPCookieJar
|
|||
orig = HTTP::Cookie.new(cookie_values)
|
||||
@jar.add(orig)
|
||||
|
||||
time = Time.now
|
||||
time = orig.accessed_at
|
||||
|
||||
assert_send [time, :>, orig.accessed_at], "accessed_at is initialized to the current time"
|
||||
assert_in_delta 1.0, time, Time.now, "accessed_at is initialized to the current time"
|
||||
|
||||
cookie, = @jar.to_a
|
||||
|
||||
assert_send [time, :>, cookie.accessed_at], "accessed_at is not updated by each()"
|
||||
assert_equal time, cookie.accessed_at, "accessed_at is not updated by each()"
|
||||
|
||||
sleep 0.1
|
||||
|
||||
cookie, = @jar.cookies("http://rubyforge.org/")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue