Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Nov 8, 2021
1 parent 30766bc commit 535bbb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cookies/cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ impl Error for ParseError {}
/// Builder for a [`Cookie`].
///
/// ```rust
/// use chrono::{Utc, Duration};
/// use isahc::cookies::Cookie;
/// use std::time::{Duration, SystemTime};
///
/// let cookie: Cookie = Cookie::builder("name", "value") // or CookieBuilder::new("name", "value")
/// .domain("example.com")
/// .path("/")
/// .secure(true)
/// .expiration(Utc::now() + Duration::minutes(30))
/// .expiration(SystemTime::now() + Duration::from_secs(30 * 60))
/// .build()
/// .unwrap();
/// ```
Expand Down Expand Up @@ -475,7 +475,7 @@ mod tests {
assert_eq!(cookie.path(), Some("/sub"));
assert_eq!(cookie.domain.as_deref(), Some("baz.com"));
assert!(cookie.is_secure());
assert!(!cookie.is_expired());
assert!(cookie.is_expired());
assert_eq!(
cookie.expiration.as_ref().map(system_time_timestamp),
Some(1_445_412_480)
Expand Down

0 comments on commit 535bbb0

Please sign in to comment.