forked from lavina/lavina
1
0
Fork 0

formatting check

This commit is contained in:
Nikita Vilunov 2024-04-20 19:16:00 +02:00
parent dc2446abaf
commit d7a5c70f53
1 changed files with 7 additions and 1 deletions

View File

@ -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?;