aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-tl-tests.el
diff options
context:
space:
mode:
authorHolger Dürer <me@hdurer.net>2017-05-10 21:26:43 +0100
committerHolger Dürer <me@hdurer.net>2017-05-12 09:20:03 +0100
commit91d488571bf796b61d275def376603975f127fde (patch)
treec85cc7b036b4fb4e59b98f540c1b57a38eb9b6f5 /test/mastodon-tl-tests.el
parentb20265eea37884bde663aa6d1d498c9180b89947 (diff)
Add tests for mastodon-media.el
This also includes tweaks to make Travis happy — tests previously did pass on my laptop but Travis's environment is different.
Diffstat (limited to 'test/mastodon-tl-tests.el')
-rw-r--r--test/mastodon-tl-tests.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el
index 0d0458d..a91d6d5 100644
--- a/test/mastodon-tl-tests.el
+++ b/test/mastodon-tl-tests.el
@@ -122,6 +122,7 @@
(let ((mastodon-media-show-avatars-p t)
(timestamp (cdr (assoc 'created_at mastodon-tl-test-base-toot))))
(with-mock
+ (stub create-image => '(image "fake data"))
(mock (date-to-time timestamp) => '(22782 21551))
(mock (format-time-string mastodon-toot-timestamp-format '(22782 21551)) => "2999-99-99 00:11:22")
@@ -204,6 +205,7 @@
(with-mock
;; We don't expect to use the toot's timestamp but the timestamp of the
;; reblogged toot:
+ (stub create-image => '(image "fake data"))
(mock (date-to-time timestamp) => '(1 2))
(mock (format-time-string mastodon-toot-timestamp-format '(1 2)) => "reblogging time")
(mock (date-to-time original-timestamp) => '(3 4))