aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-media-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* media tests: comment calls to image-type-available-p, fix some but not allmarty hiatt2024-08-131-8/+8
|
* fix some media texts, help-echomarty hiatt2024-08-131-2/+2
|
* fix media-link-rendering-gif testmousebot2022-02-111-1/+1
|
* Merge branch 'develop' into media-typemousebot2021-12-161-171/+173
|\
| * Make the local ert runner pass.Holger Dürer2021-11-101-0/+2
| | | | | | | | | | | | 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-101-9/+11
| | | | | | | | | | | | | | - 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-172/+172
| | | | | | | | | | - Remove redundant let binding of vars - Re-indent various things to better fit reasonably on a screen.
* | 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-061-133/+133
| | | | | | | | | | | 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.
* 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.