From 993fbec64edf128ba9e5a1aa61f93c385fe3be31 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Sun, 23 Apr 2017 01:14:18 -0400 Subject: Clean up tests and update DOCSTRINGs --- test/mastodon-tl-tests.el | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'test/mastodon-tl-tests.el') diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el index 19d7e55..9c45abd 100644 --- a/test/mastodon-tl-tests.el +++ b/test/mastodon-tl-tests.el @@ -1,15 +1,11 @@ (require 'el-mock) -(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 remove-html-1 () + "Should remove all tags." + (let ((input "foobar foobaz")) + (should (string= (mastodon-tl--remove-html input) "foobar foobaz")))) -(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")))) +(ert-deftest remove-html-2 () + "Should replace <\p> tags with two new lines." + (let ((input "foobar

")) + (should (string= (mastodon-tl--remove-html input) "foobar\n\n")))) -- cgit v1.2.3