aboutsummaryrefslogtreecommitdiff
path: root/tests/test-wttrin--format-staleness-header.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-wttrin--format-staleness-header.el')
-rw-r--r--tests/test-wttrin--format-staleness-header.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-wttrin--format-staleness-header.el b/tests/test-wttrin--format-staleness-header.el
index 5658be0..7a39b9a 100644
--- a/tests/test-wttrin--format-staleness-header.el
+++ b/tests/test-wttrin--format-staleness-header.el
@@ -50,6 +50,18 @@
(should (string-match-p "just now" header)))))
(test-wttrin--format-staleness-header-teardown)))
+(ert-deftest test-wttrin--format-staleness-header-normal-carries-face ()
+ "The returned header string is styled with `wttrin-staleness-header'."
+ (test-wttrin--format-staleness-header-setup)
+ (unwind-protect
+ (let ((now 1000000.0))
+ (cl-letf (((symbol-function 'float-time) (lambda () now)))
+ (testutil-wttrin-add-to-cache "Paris" "weather data" 300)
+ (let ((header (wttrin--format-staleness-header "Paris")))
+ (should (eq (get-text-property 0 'face header)
+ 'wttrin-staleness-header)))))
+ (test-wttrin--format-staleness-header-teardown)))
+
;;; Boundary Cases
(ert-deftest test-wttrin--format-staleness-header-boundary-no-cache-returns-nil ()