aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2023-04-30 18:09:03 -0400
committerKyle Meyer <kyle@kyleam.com>2023-04-30 18:09:03 -0400
commitd78900f06615e247cee5472beca4e7ae164fe77f (patch)
tree77737fbff013069da25db0b334f58397ae5d2e7d /tests
parent6776cacf0e524389d8177df7e295ea38e7116a73 (diff)
downloadpiem-d78900f06615e247cee5472beca4e7ae164fe77f.tar.gz
piem-rmail-tests.el: Silence rmail-mode messages
Avoid polluting the test output with Counting messages... Counting messages...done
Diffstat (limited to 'tests')
-rw-r--r--tests/piem-rmail-tests.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/piem-rmail-tests.el b/tests/piem-rmail-tests.el
index a9b397b..f56e2f2 100644
--- a/tests/piem-rmail-tests.el
+++ b/tests/piem-rmail-tests.el
@@ -47,12 +47,16 @@ References: <123@example.com>
no thanks
")
+(defun piem-rmail-tests-rmail-mode ()
+ (cl-letf (((symbol-function #'message) (lambda (&rest _))))
+ (rmail-mode)))
+
(ert-deftest piem-rmail-get-inbox ()
(should
(equal "foo"
(with-temp-buffer
(insert piem-rmail-tests-mbox-text)
- (rmail-mode)
+ (piem-rmail-tests-rmail-mode)
(let ((piem-get-inboxes-from-config nil)
(piem-inboxes '(("foo" :address "i@inbox.example.com"))))
(piem-rmail-get-inbox))))))
@@ -62,7 +66,7 @@ no thanks
(equal (list "123@example.com" "456@example.com")
(with-temp-buffer
(insert piem-rmail-tests-mbox-text)
- (rmail-mode)
+ (piem-rmail-tests-rmail-mode)
(rmail-first-message)
(let ((piem-get-inboxes-from-config nil)
(piem-inboxes '(("foo" :address "i@inbox.example.com"))))