summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration.rs b/tests/integration.rs
index 1866702..99c7a4f 100644
--- a/tests/integration.rs
+++ b/tests/integration.rs
@@ -2,7 +2,6 @@ use std::env;
use anyhow::Context;
use base64::URL_SAFE_NO_PAD;
-use chrono::{Duration, Utc};
use futures::channel::oneshot::channel;
use minor_skulk::{build, db::Db};
use password_hash::rand_core::OsRng;
@@ -11,6 +10,7 @@ use rocket::{
fairing::AdHoc,
tokio::{process::Command, spawn},
};
+use time::{Duration, OffsetDateTime};
#[macro_use]
extern crate rocket;
@@ -54,7 +54,9 @@ async fn run_pytest(
let mut code = [0; 32];
OsRng.fill_bytes(&mut code);
let code = base64::encode_config(code, URL_SAFE_NO_PAD);
- tx.add_invite_code(&code, Utc::now() + Duration::minutes(5)).await.unwrap();
+ tx.add_invite_code(&code, OffsetDateTime::now_utc() + Duration::minutes(5))
+ .await
+ .unwrap();
tx.commit().await.unwrap();
env::set_var("INVITE_CODE", code);
}