aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-tl-tests.el
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-23 13:55:31 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-23 14:04:09 -0400
commit098bc1463eeac231e04dcf395626ae24e0a7ad7b (patch)
tree04dc3674660ed173bb0c3df77af3da41c579305f /test/mastodon-tl-tests.el
parent3219e560663c4dd86e0a7e66cdad5b5868fb92e6 (diff)
Close #52 with mastodon-tl--more function
You can request more toots by hitting 'j' at the end of a timeline buffer
Diffstat (limited to 'test/mastodon-tl-tests.el')
-rw-r--r--test/mastodon-tl-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el
index 9c45abd..384f46c 100644
--- a/test/mastodon-tl-tests.el
+++ b/test/mastodon-tl-tests.el
@@ -9,3 +9,10 @@
"Should replace <\p> tags with two new lines."
(let ((input "foobar</p>"))
(should (string= (mastodon-tl--remove-html input) "foobar\n\n"))))
+
+(ert-deftest more-json ()
+ "Should request toots older than max_id."
+ (let ((mastodon-instance-url "https://instance.url"))
+ (with-mock
+ (mock (mastodon-http--get-json "https://instance.url/api/v1/timelines/foo?max_id=12345"))
+ (mastodon-tl--more-json "foo" 12345))))