summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Song <chipbuster@users.noreply.github.com>2019-08-10 12:47:34 -0700
committerMatan Kushner <hello@matchai.me>2019-08-10 15:47:34 -0400
commit994a865d4da6e67326e1f19094a507b6b226f225 (patch)
tree34dd6b9cb0be00af33c60474d6c1163b10465a9c /src
parentf4bb72045f5f9eac8317f3f56556371d8871ada4 (diff)
fix: Add test attribute to cmd_duration tests (#134)
Diffstat (limited to 'src')
-rw-r--r--src/modules/cmd_duration.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/cmd_duration.rs b/src/modules/cmd_duration.rs
index 1f0cd3e4d..c38a9b601 100644
--- a/src/modules/cmd_duration.rs
+++ b/src/modules/cmd_duration.rs
@@ -1,4 +1,3 @@
-use crate::config::Config;
use ansi_term::Color;
use super::{Context, Module};
@@ -77,12 +76,15 @@ mod tests {
fn test_10s() {
assert_eq!(render_time(10 as u64), "10s")
}
+ #[test]
fn test_90s() {
assert_eq!(render_time(90 as u64), "1m30s")
}
+ #[test]
fn test_10110s() {
- assert_eq!(render_time(10110 as u64), "1h48m30s")
+ assert_eq!(render_time(10110 as u64), "2h48m30s")
}
+ #[test]
fn test_1d() {
assert_eq!(render_time(86400 as u64), "1d")
}