working test, all failed as of now

This commit is contained in:
filipriec
2025-03-03 23:55:48 +01:00
parent 74f43bdc52
commit c8bd4ab6ad

View File

@@ -104,7 +104,9 @@ async fn assert_table_response(pool: &PgPool, response: &PostTableDataResponse,
check_field("fax", expected.get("fax").unwrap_or(&String::new()));
// Handle timestamp conversion
let created_at: chrono::DateTime<Utc> = row.created_at.unwrap().into();
let odt = row.created_at.unwrap();
let created_at = chrono::DateTime::from_timestamp(odt.unix_timestamp(), odt.nanosecond())
.expect("Invalid timestamp");
assert!(created_at <= Utc::now());
}