From 098bc1463eeac231e04dcf395626ae24e0a7ad7b Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Sun, 23 Apr 2017 13:55:31 -0400 Subject: Close #52 with mastodon-tl--more function You can request more toots by hitting 'j' at the end of a timeline buffer --- test/ert-helper.el | 1 + test/mastodon-tl-tests.el | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'test') diff --git a/test/ert-helper.el b/test/ert-helper.el index 53111d7..517eb35 100644 --- a/test/ert-helper.el +++ b/test/ert-helper.el @@ -3,4 +3,5 @@ (load-file "lisp/mastodon-auth.el") (load-file "lisp/mastodon-toot.el") (load-file "lisp/mastodon-tl.el") +(load-file "lisp/mastodon.el") 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

")) (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)))) -- cgit v1.2.3