aboutsummaryrefslogtreecommitdiff
path: root/test/mastodon-tl-tests.el
blob: 9c45abdc47c2bb3da0f98486a977d97b314229af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
(require 'el-mock)

(ert-deftest remove-html-1 ()
  "Should remove all <span> tags."
  (let ((input "<span class=\"h-card\">foobar</span> <span>foobaz</span>"))
    (should (string= (mastodon-tl--remove-html input) "foobar foobaz"))))

(ert-deftest remove-html-2 ()
  "Should replace <\p> tags with two new lines."
  (let ((input "foobar</p>"))
    (should (string= (mastodon-tl--remove-html input) "foobar\n\n"))))