From 140183c426bfa3557fa9fde9192cae6d1678ba6c Mon Sep 17 00:00:00 2001 From: Gregor Grigorjan Date: Fri, 17 May 2024 02:57:19 +0300 Subject: [PATCH] feat(test): add `magit` tests So we can be sure the status buffer opens without errors --- test/magit-file-icons-tests.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/magit-file-icons-tests.el b/test/magit-file-icons-tests.el index 20507759..57acde05 100644 --- a/test/magit-file-icons-tests.el +++ b/test/magit-file-icons-tests.el @@ -4,9 +4,28 @@ (require 'el-patch) (require 'magit-file-icons) -(ert-deftest magit-file-icons-should-have-no-invalid-templates () +(ert-deftest magit-file-icons-test-has-no-invalid-templates () (el-patch-validate-all-templates)) +(ert-deftest magit-file-icons-test-can-open-magit-status-buffer-while-in-minor-mode () + (magit-file-icons-mode +1) + (magit-status-setup-buffer)) + +(ert-deftest magit-file-icons-test-can-enable-minor-mode-in-magit-status-buffer () + (magit-status-setup-buffer) + (magit-file-icons-mode +1)) + +(ert-deftest magit-file-icons-test-can-disable-minor-mode-in-magit-status-buffer () + (magit-file-icons-mode +1) + (magit-status-setup-buffer) + (magit-file-icons-mode -1)) + +(ert-deftest magit-file-icons-test-can-toggle-minor-mode-in-magit-status-buffer () + (magit-file-icons-mode +1) + (magit-status-setup-buffer) + (magit-file-icons-mode 'toggle) + (magit-file-icons-mode 'toggle)) + ;; Local Variables: ;; flycheck-disabled-checkers: (emacs-lisp-checkdoc) ;; End: