Skip to content

Commit

Permalink
remove extra periods in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
bmmcginty committed Oct 16, 2017
1 parent d147d5d commit e2e9b28
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/std/http/cookie_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ module HTTP
describe "expiration_time" do
it "sets expiration_time to be current when max-age=0" do
cookie = parse_set_cookie("bla=1; max-age=0")
(Time.now - cookie.expiration_time.not_nil!).should be.<= 1.seconds
(Time.now - cookie.expiration_time.not_nil!).should be <= 1.seconds
end

it "sets expiration_time with old date" do
Expand All @@ -166,14 +166,14 @@ module HTTP

it "sets future expiration_time with max-age" do
cookie = parse_set_cookie("bla=1; max-age=1")
(cookie.expiration_time.not_nil!).should be.> Time.now
(cookie.expiration_time.not_nil!).should be > Time.now
end

it "sets future expiration_time with max-age and future cookie creation time" do
cookie = parse_set_cookie("bla=1; max-age=1")
cookie_expiration = cookie.expiration_time(time_reference: Time.now + 20.seconds).not_nil!
(Time.now + 20.seconds).should be.< cookie_expiration
(Time.now + 21.seconds).should be.>= cookie_expiration
(Time.now + 20.seconds).should be < cookie_expiration
(Time.now + 21.seconds).should be >= cookie_expiration
end

it "sets future expiration_time with expires" do
Expand Down Expand Up @@ -211,8 +211,8 @@ module HTTP
it "sets past expiration_time with max-age and future time reference" do
cookie = parse_set_cookie("bla=1; max-age=1")
cookie_expiration = cookie.expiration_time(time_reference: Time.now - 20.seconds).not_nil!
(Time.now - 20.seconds).should be.< cookie_expiration
(Time.now - 18.seconds).should be.> cookie_expiration
(Time.now - 20.seconds).should be < cookie_expiration
(Time.now - 18.seconds).should be > cookie_expiration
cookie_expired = cookie.expired?(time_reference: Time.now - 20.seconds)
cookie_expired.should be_true
end
Expand Down

0 comments on commit e2e9b28

Please sign in to comment.