aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* fix media-link-rendering-gif testmousebot2022-02-111-1/+1
|
* making a start on pinned toot testsmousebot2021-12-201-1/+31
|
* tests for own-toot-pmousebot2021-12-201-21/+36
|
* improve delete toot testsmousebot2021-12-202-7/+9
|
* delete toot test use temp buffermousebot2021-12-201-15/+44
|
* hack attempts to test delete toot functionsmousebot2021-12-201-2/+39
|
* add block/mute calls to test do user action functionmousebot2021-12-201-2/+22
|
* test mastodon-tl--do-user-action-functionmousebot2021-12-201-1/+95
|
* test mastodon-http--triagemousebot2021-12-201-0/+75
|
* Merge branch 'develop' into notify-when-postmousebot2021-12-1610-265/+532
|\
| * Merge branch 'develop' into media-typemousebot2021-12-1610-607/+633
| |\
| | * Make the local ert runner pass.Holger Dürer2021-11-103-1/+4
| | | | | | | | | | | | | | | | | | When just loading the lisp and test files one can run `M-x ert` but because things are subtly different we need to tweak a few more things to make things pass in that mode.
| | * Hamonize tests.Holger Dürer2021-11-109-127/+134
| | | | | | | | | | | | | | | | | | | | | - 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-108-511/+517
| | | | | | | | | | | | | | | - Remove redundant let binding of vars - Re-indent various things to better fit reasonably on a screen.
| | * Change `mastodon-auth-test.el` to not expect errors.Holger Dürer2021-11-101-4/+16
| | | | | | | | | | | | | | | | | | | | | Instead let's catch the error and then assert the correct error text. This is more specific and also looks nicer on a test run as there are no `F` symbols for the (expected) failures.
| * | update mastodon-media:get-media-link-rendering{-gif}mousebot2021-11-091-1/+28
| |/ | | | | | | | | to handle adding property "type" to media, and to display in help-echo if not an image.
| * update test mastodon-media:get-media-link-rendering with extra propsmousebot2021-11-091-2/+10
| |
| * Reformat all code.Holger Dürer2021-11-067-390/+390
| | | | | | | | | | | | | | | | | | | | | | 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.
| * add tests for -search.elmousebot2021-11-062-0/+142
| |
| * Fix tests.Holger Dürer2021-11-016-19/+83
| | | | | | | | | | | | | | | | | | | | | | | | These needed a bit of tender love and care to get back into passing state. - Move the auth tests to the `test` directory. No idea what it was doing in `lisp`. - Image tests are mostly broken because with later Emacsen we no longer need the `imagemagic` option on create-image. - Some method signatures have changed and mocking calls needed to follow suit.
* | update mastodon-notifications--test-byline-concat for post notifymousebot2021-11-061-1/+3
|/
* fix tests to work with my changes: bylines + notifs asyncmousebot2021-08-072-30/+34
|
* Make the test less fragileJohnson Denen2019-03-041-1/+2
|
* 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
* Clean up whitespaceJohnson Denen2018-08-103-8/+8
|
* Give mastodon-media--inline-images a saner interface. (#191)H Durer2018-08-101-1/+1
| | | | | | | | Instead of making it search the whole buffer every time to find images to load, give it a range where this work should be done. We then call this immediately after inserting a single status, notification, ... There should be no big noticible difference - images might load a tiny bit sooner although I doubt you can see that. This should be more efficient on large buffers although Alex didn't notice any problems when testing streamed buffers. We should still do it as it make things easier to understand. I was always worried about these global operations.
* Adjusted mastodon-tl.el to open user profiles in emacs. (#189)Alexander Griffith2018-08-101-4/+6
| | | | | | * Adjusted mastodon-tl.el to open user profiles in emacs. This also fixes an issue in user profiles where new statuses were insert at the above rather than below the user profile header.
* Make users handles tabstops (#188) Closes #166H Durer2018-08-101-10/+65
| | | | | | * User ids in the body are tab stops. * Make user handles in byline also links to profile.
* 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.
* Adds the notification timeline to mastodon.el closing #34. (#178)Alexander Griffith2018-08-102-1/+214
| | | | | | | - Can now handle notifications (follow reblog favourite and mention) - Tests for each of the rendering functions are included - Added keybinding N to mastodon.el for mastodon-notifications-get - added mastodon-notifications to ert-helper.el
* Support toggling content warning anywhere in the toot. (#180)H Durer2018-08-101-1/+20
| | | | | This new functionality is bound to the 'c' key. To help with this functionality this also changes the 'toot-json and 'toot-id properties. These are now applied to the whole toot not just the toot's byline.
* Generalizations for notifications (#174)Alexander Griffith2018-08-101-10/+33
| | | | | | | | * Added generalizations needed for adding notifications #37 - Made generalizations to toot and bylines to enable notifications. - Fixed tl tests to account for the new function arguments. - fixed whitespace
* Recognise hashtag links and make them link to our own tag browsing ↵Holger Durer2018-08-101-0/+47
| | | | functionality instead.
* Retoot add accts closes #155Alexander Griffith2018-03-051-0/+39
| | | | | | | | | | | | | When responding to toots the full acct for both local and federated accounts are now added to the new toot buffer. Changes - Added a function in mastodon.el to return the current user acct - Added mastodon-toot--process-local, which takes an acct and appends the current server if it is local returns an empty string if the acct matches the current user and does only adds a prefix @ if the acct is federated - mastodon-toot--mentions will return a formatted string of mentions or an empty string - adds tests for mastodon-toot--mentions - adds a missing , in mastodon-http--post - `mastodon-toot--reply` now passes `mastodon-toot` a toot-id rather than the whole json - 'mastodon-toot--reply-to-id is now a local var in a new toot
* Make "Content warning" a tab stop and toggle to show/hide the main contents. ↵H Durer2018-03-051-2/+60
| | | | | | | | | | | | | (#170) * Allow user to navigate interesting things in a buffer via tabbing (tab to go forward, M-tab and S-Tab to go back). This has always been possible while on a hyperlink but now works everywhere. Currently only hyperlinks are tab stops but in the future we will want to support other things and there are already TODO comments in the code to note where we may want to do this. * Add a new tab stop and link type: spoiler toggling. This initially hides the spoiler in a toot and makes the "Content warning" a link and tab stop. The action taken is to toggle the visibility of the toot.
* Allow user to navigate interesting things in a buffer via tabbing (tab to go ↵Holger Dürer2018-03-051-14/+159
| | | | | | | forward, M-tab and S-Tab to go back). This has always been possible while on a hyperlink but now works everywhere. Currently only hyperlinks are tab stops but in the future we will want to support other things and there are already TODO comments in the code to note where we may want to do this.
* Keep track of to which instance secrets in plstore belong.Holger Dürer2018-03-022-28/+59
| | | | | | | | | | | 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).
* Closes #152 and extends the fix for #150 as well as a host of bug fixesAlexander Griffith2018-02-281-0/+22
| | | | | | | | | | | | | | | | | | We now kill the http get request buffer once JSON has been extracted. mastodon-tl--as-string was implemented and replaced any occurrence of number-to-string or int-to-string Added variable mastodon-tl--display-media-p. By default it is 't but can be made a local buffer variable and set to nil. When nil rather than displaying the media it just provides a link Media::<link> Fixed checking for faves and boosts, they should now render properly. The return from json-read-from-string for nil is :json-false which evaluates to 't in elisp. Fixed the format string that gets printed when faving and boosting Fixed mastodon-tl--thread updating and requesting and changed its behaviour such that it tries to open the original toot thread rather than the boosted thread. Added tests for both the new mastodon-tl--as-string function and the mastodon-tl--toot-id utility. enter mastodon mode before defining local buffer variable mastodon-tl--buffer-spec. This fixes some oddities with the local buffer variable.
* Merge branch 'develop' into fix-numericpAlexander Griffith2018-02-261-0/+340
|\
| * Add periodic updating of the timestamp displays.Holger Dürer2017-06-191-4/+290
| | | | | | | | | | | | | | For each buffer we add a timer that periodically checks all timestamps and updates them as needed. The logic tries to be smart and - only schedule an update when at least one timestamps display needs changing (although at the moment we update at least every 5 minutes), and - only do a limited amount of work in each timer callback so as to not block Emacs's interactive work.
| * Show the posting date in a more readable, relative to current time format.Holger Dürer2017-06-191-0/+54
| | | | | | | | This is still static, i.e. doesn't update as time progresses.
| * Catch any errors thrown during url-retrieve.Holger Dürer2017-06-191-0/+18
| | | | | | | | | | On Emacs24 I've been able to reliably fail url fetching which exposed issues in loading a timeline (it aborts the loading). This catches any errors, marking the image load as failed so that we won't retry (retries are a TODO item I guess) and then succeeds the function so the rest of the timeline loading can proceed.
* | Added tests to ensure that ids passed to mastodon-tl--updated-json and ↵alexjgriffith2018-02-251-0/+20
| | | | | | | | mastodon-tl--more-json work as both strings and integers
* | Catch any errors thrown during url-retrieve.Holger Dürer2017-06-191-0/+18
|/ | | | | On Emacs24 I've been able to reliably fail url fetching which exposed issues in loading a timeline (it aborts the loading). This catches any errors, marking the image load as failed so that we won't retry (retries are a TODO item I guess) and then succeeds the function so the rest of the timeline loading can proceed.
* Remove most byte-compile warnings.Holger Dürer2017-05-183-23/+23
| | | | | | | We do this by - moving vars into the files where they are (mostly) used - "declaring" vars used elsewhere with the (defvar <var-name>) pattern, - declaring functions defined in others functions rather than loading the file via require.
* Putting buffer name and update function in buffer local varalexjgriffith2017-05-181-44/+0
| | | | | | | | | | removed tests for previous version documented mastodon-buffer-spec getters moved mastodon-buffer-spec to mastodon.el combined mastodon-tl--get and mastodon-tl--init, along with other cleanups
* Fix for #84Alexander Griffith2017-05-181-1/+45
| | | | | | | | | | | | changed more-json in mastodon-tl-tests to recieve an endpont more evocative names and fixed whitespace replaced remaining end eith endpoint-plist added basic unit tests for endpoint selection replaced equalp with equal in tests
* Add tests for mastodon-media.elHolger Dürer2017-05-122-0/+181
| | | | This also includes tweaks to make Travis happy — tests previously did pass on my laptop but Travis's environment is different.
* Move the rendering of images fully into mastodon-media.el and use default ↵Holger Dürer2017-05-101-6/+46
| | | | | | | images. Having all the logic in one file reduces interdependencies. Having default images is more pleasing during the incremental loading.
* Add the time of posting to the byline.Holger Dürer2017-04-281-0/+178
|