aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-media-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests.Holger Dürer2021-11-011-11/+23
| | | | | | | | | | | | 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.
* 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.
* 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-181-10/+10
| | | | | | | 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.
* Add tests for mastodon-media.elHolger Dürer2017-05-121-0/+179
This also includes tweaks to make Travis happy — tests previously did pass on my laptop but Travis's environment is different.