diff --git a/crates/projection-irc/tests/lib.rs b/crates/projection-irc/tests/lib.rs index e50a629..cffc35f 100644 --- a/crates/projection-irc/tests/lib.rs +++ b/crates/projection-irc/tests/lib.rs @@ -2,7 +2,7 @@ use std::io::ErrorKind; use std::time::Duration; use anyhow::{anyhow, Result}; -use chrono::SecondsFormat; +use chrono::{DateTime, SecondsFormat}; use prometheus::Registry as MetricsRegistry; use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader}; use tokio::net::tcp::{ReadHalf, WriteHalf}; @@ -626,6 +626,12 @@ async fn server_time_capability() -> Result<()> { )) .await?; + // formatting check + assert_eq!( + DateTime::parse_from_rfc3339(&"2024-01-01T10:00:32.123Z").unwrap().to_rfc3339_opts(SecondsFormat::Millis, true), + "2024-01-01T10:00:32.123Z" + ); + s.send("QUIT :Leaving").await?; s.expect(":testserver ERROR :Leaving the server").await?; s.expect_eof().await?;