aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhiseck Paira <abhiseckpaira@disroot.org>2022-01-27 20:14:23 +0530
committerAbhiseck Paira <abhiseckpaira@disroot.org>2022-01-27 20:14:23 +0530
commit7f6102b2ac7ba8b520b3ae53717dd064e0eebee8 (patch)
tree84dd75820ca2fae702d4523b9bed2adfb639ab37
parent5071c96ad8b5af942eef5bf6c92d57929eb63188 (diff)
test: fix mastodon-auth--access-token-not-found
Since the function `mastodon-auth--handle-token-response' now calls `mastodon-client-store-access-token' and `mastodon-client-make-user-active', define mock and stub for them respectively.
-rw-r--r--test/mastodon-auth-tests.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/mastodon-auth-tests.el b/test/mastodon-auth-tests.el
index 5039bef..3ff745f 100644
--- a/test/mastodon-auth-tests.el
+++ b/test/mastodon-auth-tests.el
@@ -56,6 +56,8 @@
(mastodon-auth--token-alist nil))
(with-mock
(mock (mastodon-auth--get-token) => '(:access_token "foobaz"))
+ (mock (mastodon-client-store-access-token "foobaz"))
+ (stub mastodon-client-make-user-active)
(should
(string= (mastodon-auth--access-token)
"foobaz"))