branch: elpa/pacmacs
commit 70d381a0ca3c17b7f6019c85123a8ca75353421b
Author: rexim <[email protected]>
Commit: rexim <[email protected]>
UT for terrify-all-ghosts (#173)
---
test/pacmacs-test.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/pacmacs-test.el b/test/pacmacs-test.el
index f146abea6f..1b1e08c238 100644
--- a/test/pacmacs-test.el
+++ b/test/pacmacs-test.el
@@ -116,3 +116,13 @@
(list :terrified-timer 0)))
(should (pacmacs--terrified-ghost-timed-out-p
(list :terrified-timer -1))))
+
+(ert-deftest pacmacs--terrify-all-ghosts-test ()
+ (let* ((pacmacs--terrified-ghosts (number-sequence 1 5))
+ (pacmacs--ghosts (number-sequence 1 6)))
+ (with-mock
+ (mock (pacmacs--terrify-ghost *) => 42 :times 11)
+ (pacmacs--terrify-all-ghosts)
+
+ (should (null pacmacs--ghosts))
+ (should (= 11 (length pacmacs--terrified-ghosts))))))