emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs 4924601822 341/472: UT for unterrify-ghost functio


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 4924601822 341/472: UT for unterrify-ghost function (#171)
Date: Thu, 6 Jan 2022 21:59:37 -0500 (EST)

branch: elpa/pacmacs
commit 49246018227501d7346c28593cf573809872c1aa
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    UT for unterrify-ghost function (#171)
---
 test/pacmacs-test.el | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/test/pacmacs-test.el b/test/pacmacs-test.el
index dd40d74ca8..ee71130d3a 100644
--- a/test/pacmacs-test.el
+++ b/test/pacmacs-test.el
@@ -83,3 +83,27 @@
      (mock (pacmacs-load-anim "Terrified-Ghost") => 'terrified-ghost-animation)
      (should (equal terrified-ghost
                     (pacmacs--terrify-ghost ghost))))))
+
+(ert-deftest pacmacs--unterrify-ghost-test ()
+  (let* ((pacmacs--ghost-terrified-time-ms 60065)
+         (terrified-ghost (list :property-1 1
+                                :property-2 2
+                                :direction 'right
+                                :current-animation 'terrified-ghost-animation
+                                :switch-direction-callback 
'terrified-ghost-direction-switcher
+                                :type 'terrified-ghost
+                                :terrified-timer 
pacmacs--ghost-terrified-time-ms))
+         (ghost (list :property-1 1
+                      :property-2 2
+                      :direction 'right
+                      :current-animation 'terrified-ghost-animation
+                      :switch-direction-callback 'ghost-direction-switcher
+                      :type 'ghost
+                      :terrified-timer pacmacs--ghost-terrified-time-ms)))
+    (with-mock
+     (mock (pacmacs--switch-direction * 'right))
+     (mock (pacmacs--switch-direction-animation-callback "Red-Ghost")
+           => 'ghost-direction-switcher)
+
+     (should (equal ghost
+                    (pacmacs--unterrify-ghost terrified-ghost))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]