aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-11-09 11:27:59 +0100
committermousebot <mousebot@riseup.net>2021-11-09 11:27:59 +0100
commit4d00c5f3d91aba2dea867d6b8fa7cbec1d6d9ff2 (patch)
tree0787e6a5d8b7c729e913a828cca798e447391c3e
parent6485f236ce9bab609a606d6f5896b1d39b3c114d (diff)
parentb02782226b34507508020179e3100c307738eeee (diff)
Merge branch 'develop' into media-type
-rw-r--r--test/mastodon-media-tests.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/mastodon-media-tests.el b/test/mastodon-media-tests.el
index b537dfe..7124672 100644
--- a/test/mastodon-media-tests.el
+++ b/test/mastodon-media-tests.el
@@ -22,14 +22,22 @@
(mock (create-image * nil t) => :mock-image)
(let* ((mastodon-media--preview-max-height 123)
- (result (mastodon-media--get-media-link-rendering "http://example.org/img.png"))
+ (result
+ (mastodon-media--get-media-link-rendering "http://example.org/img.png"
+ "http://example.org/remote/img.png"))
(result-no-properties (substring-no-properties result))
(properties (text-properties-at 0 result)))
(should (string= "[img] " result-no-properties))
(should (string= "http://example.org/img.png" (plist-get properties 'media-url)))
(should (eq 'needs-loading (plist-get properties 'media-state)))
(should (eq 'media-link (plist-get properties 'media-type)))
- (should (eq :mock-image (plist-get properties 'display))))))
+ (should (eq :mock-image (plist-get properties 'display)))
+ (should (eq 'highlight (plist-get properties 'mouse-face)))
+ (should (eq 'image (plist-get properties 'mastodon-tab-stop)))
+ (should (string= "http://example.org/remote/img.png" (plist-get properties 'image-url)))
+ (should (eq mastodon-tl--shr-image-map-replacement (plist-get properties 'keymap)))
+ (should (string= "RET/i: load full image (prefix: copy URL), +/-: zoom, r: rotate, o: save preview"
+ (plist-get properties 'help-echo))))))
(ert-deftest mastodon-media:load-image-from-url:avatar-with-imagemagic ()
"Should make the right call to url-retrieve."