diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-10-30 19:53:17 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-10-30 19:53:17 +0100 |
commit | 40e8123b84ce54100a818e6b19507d3a492614f6 (patch) | |
tree | 118d1611d54917787fad8ddd36c54199be2dadf7 /test/mastodon-tl-tests.el | |
parent | 87a6bc9d7d0026ba88a958ed9d3a9d074374b164 (diff) | |
parent | 1bfcb22043580d6bc4252300f55135aac8c50aea (diff) |
Merge branch 'triage-response-data' into develop
Diffstat (limited to 'test/mastodon-tl-tests.el')
-rw-r--r-- | test/mastodon-tl-tests.el | 102 |
1 files changed, 57 insertions, 45 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el index be72f66..2aa0505 100644 --- a/test/mastodon-tl-tests.el +++ b/test/mastodon-tl-tests.el @@ -1090,56 +1090,68 @@ correct value for following, as well as notifications enabled or disabled." (let ((response-buffer-true (current-buffer))) (insert mastodon-tl--follow-notify-true-response) (with-mock - (mock (mastodon-http--post url-follow-only nil) - => response-buffer-true) - (should - (equal - (mastodon-tl--do-user-action-function url-follow-only - user-name - user-handle - "follow") - "User some-user (@some-user@instance.url) followed!")) - (mock (mastodon-http--post url-mute nil) - => response-buffer-true) - (should - (equal - (mastodon-tl--do-user-action-function url-mute - user-name - user-handle - "mute") - "User some-user (@some-user@instance.url) muted!")) - (mock (mastodon-http--post url-block nil) - => response-buffer-true) - (should - (equal - (mastodon-tl--do-user-action-function url-block - user-name - user-handle - "block") - "User some-user (@some-user@instance.url) blocked!"))) + (mock (mastodon-http--post url-follow-only nil) + => response-buffer-true) + (should + (equal + (mastodon-tl--do-user-action-function url-follow-only + user-name + user-handle + "follow") + "User some-user (@some-user@instance.url) followed!"))))) + (with-temp-buffer + (let ((response-buffer-true (current-buffer))) + (insert mastodon-tl--follow-notify-true-response) + (with-mock + (mock (mastodon-http--post url-mute nil) + => response-buffer-true) + (should + (equal + (mastodon-tl--do-user-action-function url-mute + user-name + user-handle + "mute") + "User some-user (@some-user@instance.url) muted!"))))) + (with-temp-buffer + (let ((response-buffer-true (current-buffer))) + (insert mastodon-tl--follow-notify-true-response) + (with-mock + (mock (mastodon-http--post url-block nil) + => response-buffer-true) + (should + (equal + (mastodon-tl--do-user-action-function url-block + user-name + user-handle + "block") + "User some-user (@some-user@instance.url) blocked!"))))) + (with-temp-buffer + (let ((response-buffer-true (current-buffer))) + (insert mastodon-tl--follow-notify-true-response) (with-mock - (mock (mastodon-http--post url-true nil) => response-buffer-true) - (should - (equal - (mastodon-tl--do-user-action-function url-true - user-name - user-handle - "follow" - "true") - "Receiving notifications for user some-user (@some-user@instance.url)!"))))) + (with-mock + (mock (mastodon-http--post url-true nil) => response-buffer-true) + (should + (equal + (mastodon-tl--do-user-action-function url-true + user-name + user-handle + "follow" + "true") + "Receiving notifications for user some-user (@some-user@instance.url)!")))))) (with-temp-buffer (let ((response-buffer-false (current-buffer))) (insert mastodon-tl--follow-notify-false-response) (with-mock - (mock (mastodon-http--post url-false nil) => response-buffer-false) - (should - (equal - (mastodon-tl--do-user-action-function url-false - user-name - user-handle - "follow" - "false") - "Not receiving notifications for user some-user (@some-user@instance.url)!"))))))) + (mock (mastodon-http--post url-false nil) => response-buffer-false) + (should + (equal + (mastodon-tl--do-user-action-function url-false + user-name + user-handle + "follow" + "false") + "Not receiving notifications for user some-user (@some-user@instance.url)!"))))))) (ert-deftest mastodon-tl--report-to-mods-params-alist () "" |