aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-tl-tests.el
diff options
context:
space:
mode:
authorNicolas P. Rougier <Nicolas.Rougier@inria.fr>2022-11-28 16:46:42 +0100
committerNicolas P. Rougier <Nicolas.Rougier@inria.fr>2022-11-28 16:46:42 +0100
commitd2bce7f37a9c1f177f42f491662178a45dbc6858 (patch)
tree74bcc3e2eb0585bb644bbc747a446805a4894dbf /test/mastodon-tl-tests.el
parentbf8d9dccb47c60e494b9bd96a74adaeb1be92975 (diff)
Fixed test for new elative strings
Diffstat (limited to 'test/mastodon-tl-tests.el')
-rw-r--r--test/mastodon-tl-tests.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el
index 1d9355b..726e21a 100644
--- a/test/mastodon-tl-tests.el
+++ b/test/mastodon-tl-tests.el
@@ -213,28 +213,28 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--relative-time-description timestamp)))
(check (seconds expected)
(should (string= (format-seconds-since seconds) expected))))
- (check 1 "less than a minute ago")
- (check 59 "less than a minute ago")
- (check 60 "one minute ago")
- (check 89 "one minute ago") ;; rounding down
+ (check 1 "just now")
+ (check 59 "just now")
+ (check 60 "1 minute ago")
+ (check 89 "1 minute ago") ;; rounding down
(check 91 "2 minutes ago") ;; rounding up
(check (minutes 3.49) "3 minutes ago") ;; rounding down
(check (minutes 3.52) "4 minutes ago")
(check (minutes 59) "59 minutes ago")
- (check (minutes 60) "one hour ago")
- (check (minutes 89) "one hour ago")
+ (check (minutes 60) "1 hour ago")
+ (check (minutes 89) "1 hour ago")
(check (minutes 91) "2 hours ago")
(check (hours 3.49) "3 hours ago") ;; rounding down
(check (hours 3.51) "4 hours ago") ;; rounding down
(check (hours 23.4) "23 hours ago")
- (check (hours 23.6) "one day ago") ;; rounding up
- (check (days 1.48) "one day ago") ;; rounding down
+ (check (hours 23.6) "1 day ago") ;; rounding up
+ (check (days 1.48) "1 day ago") ;; rounding down
(check (days 1.52) "2 days ago") ;; rounding up
- (check (days 6.6) "one week ago") ;; rounding up
+ (check (days 6.6) "1 week ago") ;; rounding up
(check (weeks 2.49) "2 weeks ago") ;; rounding down
(check (weeks 2.51) "3 weeks ago") ;; rounding down
(check (1- (weeks 52)) "52 weeks ago")
- (check (weeks 52) "one year ago")
+ (check (weeks 52) "1 year ago")
(check (years 2.49) "2 years ago") ;; rounding down
(check (years 2.51) "3 years ago") ;; rounding down
))