Skip to content

Commit

Permalink
feat(test): add basic magit tests
Browse files Browse the repository at this point in the history
So we can be sure the status buffer opens without errors
  • Loading branch information
gekoke committed May 17, 2024
1 parent 1586048 commit cfb8acd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/magit-file-icons-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cfb8acd

Please sign in to comment.