diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-12 00:42:52 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-12 00:42:52 -0500 |
| commit | 8cb30ef6efd06464ab1153b99261a3f626149f97 (patch) | |
| tree | 79d4189a2c15cba740daf6e5bc0b626e386c7552 /tests | |
| parent | b45638194cc19b026c49e0cb4787024c73723954 (diff) | |
| download | dotemacs-8cb30ef6efd06464ab1153b99261a3f626149f97.tar.gz dotemacs-8cb30ef6efd06464ab1153b99261a3f626149f97.zip | |
fix(slack): error when adding a reaction outside a Slack buffer
`cj/slack-message-add-reaction' wrapped its whole body in `when-let*' on `slack-current-buffer', so invoking C-; S ! outside a Slack message view did nothing at all, and with no message it looked like the key wasn't even bound. It now `user-error's "Not in a Slack buffer". A test covers the case.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-slack-config-reactions.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-slack-config-reactions.el b/tests/test-slack-config-reactions.el index a5755a49..491b8147 100644 --- a/tests/test-slack-config-reactions.el +++ b/tests/test-slack-config-reactions.el @@ -87,5 +87,10 @@ (cj/slack-message-add-reaction) (should (equal called '(:buffer "pray" "123.456")))))) +(ert-deftest test-slack-config-message-add-reaction-errors-outside-slack-buffer () + "Error: invoking the reaction command outside a Slack buffer fails clearly." + (let ((slack-current-buffer nil)) + (should-error (cj/slack-message-add-reaction) :type 'user-error))) + (provide 'test-slack-config-reactions) ;;; test-slack-config-reactions.el ends here |
