aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-auth-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* fix auth test and ert-helper.el file ordermarty hiatt2023-03-211-1/+1
|
* manually(!) apply stephan monnier's patch, save the ts workmarty hiatt2023-03-211-1/+3
| | | | thanks stephan!
* test: fix `mastodon-auth--access-token-not-found'Abhiseck Paira2022-02-251-0/+1
|
* test: add `mastodon-auth--user-unaware'Abhiseck Paira2022-02-251-0/+8
| | | | | Test for the situation when old mastodon.el users are unaware of the variable `mastodon-active-user'.
* change '-' to '--' in between function and namespace namesAbhiseck Paira2022-02-231-2/+2
| | | | | | | | mastodon.el currently follows the convention where all function names should have two dashes (not one dash) in between function and namespace names. Update all function names to follow this convention. See issue #205 and pull request #255
* test: fix mastodon-auth--access-token-not-foundAbhiseck Paira2022-01-271-0/+2
| | | | | | | 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: remove tests for non existent functionsAbhiseck Paira2022-01-271-41/+0
| | | | | | | 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)
* Hamonize tests.Holger Dürer2021-11-101-10/+49
| | | | | | | - Add a header comment explicitly switching off lexical binding - Harmonize naming (always start with module and double hyphen) - Ensure all tests have at least a minimal doc string. - Move tests from `mastodon-auth-test.el` to `mastodon-auth-tests.el`
* Reformatting `mastodon-search-tests.el`.Holger Dürer2021-11-101-40/+40
| | | | | - Remove redundant let binding of vars - Re-indent various things to better fit reasonably on a screen.
* Reformat all code.Holger Dürer2021-11-061-7/+7
| | | | | | | | | | | Basically, in Emacs for each file: select all text and `indent-region`. - This also removes one redundant comment, and - fixes an error with json decoding where the `json-read-from-string` was actually not within the intended `unless` clause (which explains the warning about "result of (string-equal "" json-string) will be ignored" which I never understood.
* Use the email address of the current user as default (#203)Jürgen Hötzel2019-03-041-1/+1
| | | | * Use the email address of the current user as default
* Optionally use auth-source-search for fetching and saving password. (#181)H Durer2018-08-101-15/+38
| | | | | | | | | * Use auth-source-search for fetching and saving password This gives users the ability to save their password to either the gpg-encrypted ~/.authinfo.gpg or ~/.authinfo so that they don't have to provide username/password each time * Add a new custom var to decide whether to use the auth-source package or not.
* Keep track of to which instance secrets in plstore belong.Holger Dürer2018-03-021-6/+9
| | | | | | | | | | | While testing out issue 149 (https://github.com/jdenen/mastodon.el/issues/149) I had problems due to stale client information being cached. With this change we store various pieces of information (the client information in the plstore and the auth tokens) in alists keyed by the instance url (and the plstore key contains the instance url as well to allow us to store data per instance).
* Clean up tests and update DOCSTRINGsJohnson Denen2017-04-231-4/+4
|
* Rewrite mastodon-authJohnson Denen2017-04-231-127/+35
| | | | | | - Remove client functions - Use mastodon-http--post - No more callback spaghetti
* Use Cask to run tests in TravisCIJohnson Denen2017-04-231-4/+0
|
* Add `mastodon-auth--client' functionJohnson Denen2017-04-121-4/+7
| | | | Replace direct references to `mastodon--client-app-plist'
* Add tests for `mastodon--access-token'Johnson Denen2017-04-121-1/+15
|
* Add mastodon--get-access-token testJohnson Denen2017-04-121-0/+16
| | | | Abstract Email and Password prompts to `mastodon-auth--user-and-passwd' function
* Abstract success lambda to its own function and testJohnson Denen2017-04-121-0/+14
| | | | | | Add `mastodon-auth--get-token-success' Add test for `mastodon-auth--get-token-success' Add test for `mastodon--get-access-token-triage'
* Add mastodon--client-app testsJohnson Denen2017-04-121-0/+21
|
* Add store-client-id-and-secret testJohnson Denen2017-04-121-0/+24
| | | | | Add `mastodon-auth--token-file' function Add test for `mastodon-auth--token-file'
* Add mastodon--register-and-return-client-app testJohnson Denen2017-04-121-14/+27
| | | | Refactor tests to check plist return value
* Add mastodon-auth--register-client-app testJohnson Denen2017-04-121-0/+19
| | | | Add mastodon-auth--register-client-app-triage test
* Add mastodon-auth--registration-success testJohnson Denen2017-04-121-0/+12