diff options
author | Abhiseck Paira <abhiseckpaira@disroot.org> | 2022-02-25 20:42:48 +0530 |
---|---|---|
committer | Abhiseck Paira <abhiseckpaira@disroot.org> | 2022-02-25 20:42:48 +0530 |
commit | 92f898f0a90760078a1bbfc843568e858891b6c9 (patch) | |
tree | bfa08c83c6578cb5a11f65028d46bdda4737ecb7 /test/mastodon-auth-tests.el | |
parent | fbb34e106b7164a9c1d47cf31d9803827540e228 (diff) |
test: add `mastodon-auth--user-unaware'
Test for the situation when old mastodon.el users are unaware of the
variable `mastodon-active-user'.
Diffstat (limited to 'test/mastodon-auth-tests.el')
-rw-r--r-- | test/mastodon-auth-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mastodon-auth-tests.el b/test/mastodon-auth-tests.el index 3bf65b2..3ecac30 100644 --- a/test/mastodon-auth-tests.el +++ b/test/mastodon-auth-tests.el @@ -64,3 +64,11 @@ (should (equal mastodon-auth--token-alist '(("https://instance.url" . "foobaz"))))))) + +(ert-deftest mastodon-auth--user-unaware () + (let ((mastodon-instance-url "https://instance.url") + (mastodon-active-user nil) + (mastodon-auth--token-alist nil)) + (with-mock + (mock (mastodon-client--active-user)) + (should-error (mastodon-auth--access-token))))) |