From dc838433db4404653e01abfc54f8c001f6df68ce Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Thu, 2 Feb 2023 21:04:13 +0100 Subject: [PATCH] test: add format time default test --- src/builtins/time.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/builtins/time.rs b/src/builtins/time.rs index b4c1e2e..4975ce3 100644 --- a/src/builtins/time.rs +++ b/src/builtins/time.rs @@ -51,4 +51,10 @@ mod tests { let time = chrono::Utc.with_ymd_and_hms(6969, 4, 20, 4, 20, 9).unwrap(); assert_eq!(format_time(time, "RFC3339"), "6969-04-20T04:20:09+00:00") } + + #[test] + fn test_format_time_default() { + let time = chrono::Utc.with_ymd_and_hms(6969, 4, 20, 4, 20, 9).unwrap(); + assert_eq!(format_time(time, ""), "04:20:09") + } }