From 0517d7b94e7f4ef92cd69d2cb2a342994afcb606 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Fri, 8 Nov 2024 15:41:11 +0100 Subject: [PATCH] notify: renderer: adapt to changes in proxmox-time A recent commit [1] changed the `Display` implementation of `TimeSpan` such that minutes are now displayed as `20m` instead of `20min`. This commit adapts the tests for the notification template renderer accordingly. [1] 19129960 ("time: display minute/month such that it can be parsed again") Signed-off-by: Lukas Wagner --- proxmox-notify/src/renderer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs index 8574a3fb..82473d03 100644 --- a/proxmox-notify/src/renderer/mod.rs +++ b/proxmox-notify/src/renderer/mod.rs @@ -329,8 +329,8 @@ mod tests { Some("1 KiB".to_string()) ); - assert_eq!(value_to_duration(&json!(60)), Some("1min ".to_string())); - assert_eq!(value_to_duration(&json!("60")), Some("1min ".to_string())); + assert_eq!(value_to_duration(&json!(60)), Some("1m".to_string())); + assert_eq!(value_to_duration(&json!("60")), Some("1m".to_string())); // The rendered value is in localtime, so we only check if the result is `Some`... // ... otherwise the test will break in another timezone :S