aboutsummaryrefslogtreecommitdiff
path: root/tests/test-wttrin-clear-cache.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-wttrin-clear-cache.el')
-rw-r--r--tests/test-wttrin-clear-cache.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test-wttrin-clear-cache.el b/tests/test-wttrin-clear-cache.el
index 8185c5f..784be4c 100644
--- a/tests/test-wttrin-clear-cache.el
+++ b/tests/test-wttrin-clear-cache.el
@@ -43,13 +43,10 @@
"User should be told the cache was cleared."
(test-wttrin-clear-cache-setup)
(unwind-protect
- (let ((displayed-message nil))
- (cl-letf (((symbol-function 'message)
- (lambda (fmt &rest args)
- (setq displayed-message (apply #'format fmt args)))))
- (wttrin-clear-cache)
- (should displayed-message)
- (should (string-match-p "cache cleared" displayed-message))))
+ (testutil-wttrin-with-captured-message displayed-message
+ (wttrin-clear-cache)
+ (should displayed-message)
+ (should (string-match-p "cache cleared" displayed-message)))
(test-wttrin-clear-cache-teardown)))
;;; Boundary Cases