Browse Source

test: add format time default test

main
fdai7375 2 years ago
parent
commit
8b2daee69c
  1. 6
      src/builtins/time.rs

6
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(); 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") 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")
}
} }
Loading…
Cancel
Save