Fixing test
This commit is contained in:
@@ -319,6 +319,7 @@ mod request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub mod scheduling {
|
pub mod scheduling {
|
||||||
|
use time::format_description::well_known::Iso8601;
|
||||||
use tower::ServiceExt;
|
use tower::ServiceExt;
|
||||||
|
|
||||||
pub async fn create_scheduled_message(
|
pub async fn create_scheduled_message(
|
||||||
@@ -335,6 +336,14 @@ mod request {
|
|||||||
*/
|
*/
|
||||||
let now = time::OffsetDateTime::now_utc();
|
let now = time::OffsetDateTime::now_utc();
|
||||||
let scheduled = now + std::time::Duration::from_secs(60 * 60);
|
let scheduled = now + std::time::Duration::from_secs(60 * 60);
|
||||||
|
let scheduled = match scheduled.format(&Iso8601::DEFAULT) {
|
||||||
|
Ok(t) => t,
|
||||||
|
Err(err) => {
|
||||||
|
assert!(false, "Error: {err:?}");
|
||||||
|
String::new()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let payload = serde_json::json!({
|
let payload = serde_json::json!({
|
||||||
"scheduled": scheduled,
|
"scheduled": scheduled,
|
||||||
"status": textsender_models::message::scheduling::PENDING,
|
"status": textsender_models::message::scheduling::PENDING,
|
||||||
|
|||||||
Reference in New Issue
Block a user