From 7f6102b2ac7ba8b520b3ae53717dd064e0eebee8 Mon Sep 17 00:00:00 2001 From: Abhiseck Paira Date: Thu, 27 Jan 2022 20:14:23 +0530 Subject: 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. --- test/mastodon-auth-tests.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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")) -- cgit v1.2.3