Skip to content

Commit

Permalink
Update chrono.rs
Browse files Browse the repository at this point in the history
revert change to date time test asserts
  • Loading branch information
era127 committed Feb 9, 2024
1 parent f63b736 commit aa8d787
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/types/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,24 +248,24 @@ mod test {
#[test]
fn test_naive_date_time_param() -> Result<()> {
let db = checked_memory_handle()?;
let result: bool = db.query_row(
let result: Result<bool> = db.query_row(
"SELECT true WHERE ? BETWEEN (now()::Timestamp - INTERVAL '1 minute') AND (now()::Timestamp + INTERVAL '1 minute')",
[Utc::now().naive_utc()],
|r| r.get(0),
)?;
assert!(result);
);
assert!(result.is_ok());
Ok(())
}

#[test]
fn test_date_time_param() -> Result<()> {
let db = checked_memory_handle()?;
let result: bool = db.query_row(
let result: Result<bool> = db.query_row(
"SELECT true WHERE ? BETWEEN (now()::Timestamp - INTERVAL '1 minute') AND (now()::Timestamp + INTERVAL '1 minute')",
[Utc::now()],
|r| r.get(0),
)?;
assert!(result);
);
assert!(result.is_ok());
Ok(())
}

Expand Down

0 comments on commit aa8d787

Please sign in to comment.