From cb8502f9ee8c3c393ba44613519bd5490ecf9775 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Fri, 14 Apr 2017 09:27:42 -0400 Subject: Retrieve home timeline with `mastodon' function --- test/mastodon-tl-tests.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/mastodon-tl-tests.el (limited to 'test') diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el new file mode 100644 index 0000000..5571e70 --- /dev/null +++ b/test/mastodon-tl-tests.el @@ -0,0 +1,16 @@ +(require 'el-mock) +(load-file "../lisp/mastodon-tl.el") + +(ert-deftest mastodon-tl:from-toot () + "Should return the value for KEY in a list." + (should (string= (mastodon-tl--from-toot "foo" '(("foo" . "bar"))) "bar"))) + +(ert-deftest mastodon-tl:remove-html:remove-p-and-span () + "Should remove

and tags that are not parsed by `html2text'." + (let ((input "

foobar

")) + (should (string= (mastodon-tl--remove-html input) "foobar\n")))) + +(ert-deftest mastodon-tl:remove-html:remove-hcard-span () + "Should remove tags with a class of 'h-card'." + (let ((input "foobar")) + (should (string= (mastodon-tl--remove-html input) "foobar")))) -- cgit v1.2.3