aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhiseck Paira <abhiseckpaira@disroot.org>2022-01-26 21:14:05 +0530
committerAbhiseck Paira <abhiseckpaira@disroot.org>2022-01-27 19:32:06 +0530
commit5071c96ad8b5af942eef5bf6c92d57929eb63188 (patch)
treeea79c4c171b7e8861297d6f851c776ffc9862a4e
parent6ff4416b809b7e8f2e7aab4e701633234dee8c1a (diff)
test: remove tests for non existent functions
Remove the tests `mastodon-auth--generate-token--no-storing-credentials' and `mastodon-auth--generate-token--storing-credentials' as functions with similar names no longer exist (due to implementation of the new login mechanism)
-rw-r--r--test/mastodon-auth-tests.el41
1 files changed, 0 insertions, 41 deletions
diff --git a/test/mastodon-auth-tests.el b/test/mastodon-auth-tests.el
index 6a090b7..5039bef 100644
--- a/test/mastodon-auth-tests.el
+++ b/test/mastodon-auth-tests.el
@@ -32,47 +32,6 @@
`(:error "invalid_grant" :error_description ,error-message))
(t error))))))
-(ert-deftest mastodon-auth--generate-token--no-storing-credentials ()
- "Should make `mastdon-http--post' request to generate auth token."
- (with-mock
- (let ((mastodon-auth-source-file "")
- (mastodon-instance-url "https://instance.url"))
- (mock (mastodon-client) => '(:client_id "id" :client_secret "secret"))
- (mock (read-string "Email: " user-mail-address) => "foo@bar.com")
- (mock (read-passwd "Password: ") => "password")
- (mock (mastodon-http--post "https://instance.url/oauth/token"
- '(("client_id" . "id")
- ("client_secret" . "secret")
- ("grant_type" . "password")
- ("username" . "foo@bar.com")
- ("password" . "password")
- ("scope" . "read write follow"))
- nil
- :unauthenticated))
- (mastodon-auth--generate-token))))
-
-(ert-deftest mastodon-auth--generate-token--storing-credentials ()
- "Should make `mastdon-http--post' request to generate auth token."
- (with-mock
- (let ((mastodon-auth-source-file "~/.authinfo")
- (mastodon-instance-url "https://instance.url"))
- (mock (mastodon-client) => '(:client_id "id" :client_secret "secret"))
- (mock (auth-source-search :create t
- :host "https://instance.url"
- :port 443
- :require '(:user :secret))
- => '((:user "foo@bar.com" :secret (lambda () "password"))))
- (mock (mastodon-http--post "https://instance.url/oauth/token"
- '(("client_id" . "id")
- ("client_secret" . "secret")
- ("grant_type" . "password")
- ("username" . "foo@bar.com")
- ("password" . "password")
- ("scope" . "read write follow"))
- nil
- :unauthenticated))
- (mastodon-auth--generate-token))))
-
(ert-deftest mastodon-auth--get-token ()
"Should generate token and return JSON response."
(with-temp-buffer