From 79653d2175ed1ac8a037fb843465012203af0aa0 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Dec 2023 11:19:18 -0500 Subject: [PATCH] Rename format distance test names --- crates/ui2/src/utils/format_distance.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ui2/src/utils/format_distance.rs b/crates/ui2/src/utils/format_distance.rs index f13e92bbe901e5538bad8566e6b2e001e8e4ff78..ec9a8ad5d879296467c8fcb22caf4b25ea4bfa7d 100644 --- a/crates/ui2/src/utils/format_distance.rs +++ b/crates/ui2/src/utils/format_distance.rs @@ -177,7 +177,7 @@ mod tests { use chrono::NaiveDateTime; #[test] - fn test_naive_format_distance() { + fn test_format_distance() { let date = DateTimeType::Naive( NaiveDateTime::from_timestamp_opt(9600, 0).expect("Invalid NaiveDateTime for date"), ); @@ -192,7 +192,7 @@ mod tests { } #[test] - fn test_naive_format_distance_with_suffix() { + fn test_format_distance_with_suffix() { let date = DateTimeType::Naive( NaiveDateTime::from_timestamp_opt(9600, 0).expect("Invalid NaiveDateTime for date"), ); @@ -207,7 +207,7 @@ mod tests { } #[test] - fn test_naive_format_distance_from_now() { + fn test_format_distance_from_now() { let date = DateTimeType::Naive( NaiveDateTime::parse_from_str("1969-07-20T00:00:00Z", "%Y-%m-%dT%H:%M:%SZ") .expect("Invalid NaiveDateTime for date"), @@ -220,7 +220,7 @@ mod tests { } #[test] - fn test_naive_format_distance_string() { + fn test_format_distance_string() { assert_eq!(distance_string(3, false, false), "less than a minute"); assert_eq!(distance_string(7, false, false), "less than a minute"); assert_eq!(distance_string(13, false, false), "less than a minute"); @@ -244,7 +244,7 @@ mod tests { } #[test] - fn test_naive_format_distance_string_include_seconds() { + fn test_format_distance_string_include_seconds() { assert_eq!(distance_string(3, true, false), "less than 5 seconds"); assert_eq!(distance_string(7, true, false), "less than 10 seconds"); assert_eq!(distance_string(13, true, false), "less than 20 seconds");