From d7a5c70f5311313b01f52a944decc24c632f9b17 Mon Sep 17 00:00:00 2001 From: Nikita Vilunov Date: Sat, 20 Apr 2024 19:16:00 +0200 Subject: [PATCH] formatting check --- crates/projection-irc/tests/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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?;