forked from lavina/lavina
formatting check
This commit is contained in:
parent
dc2446abaf
commit
d7a5c70f53
|
@ -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?;
|
||||
|
|
Loading…
Reference in New Issue