aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Griffith <griffitaj@gmail.com>2018-02-28 14:33:57 -0500
committerGitHub <noreply@github.com>2018-02-28 14:33:57 -0500
commit6c95ac3960852ba0bb41b68675a393e8ebbf49e0 (patch)
tree7a138c1d835925f197066f008b35c6b1cc386c0b /test
parentf6f6c08976a414762cd512e52237b143dc0e2f30 (diff)
parent5a8ede2990c208b1c4059092f21d216203bd0db5 (diff)
Merge pull request #153 from alexjgriffith/explicit-media-toggle
explicit media toggle and small bug fixes
Diffstat (limited to 'test')
-rw-r--r--test/mastodon-tl-tests.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el
index 7d6a08f..5d7699e 100644
--- a/test/mastodon-tl-tests.el
+++ b/test/mastodon-tl-tests.el
@@ -97,6 +97,28 @@
(let ((input "foobar</p>"))
(should (string= (mastodon-tl--remove-html input) "foobar\n\n"))))
+(ert-deftest toot-id-boosted ()
+ "If a toot is boostedm, return the reblog id."
+ (should (string= (mastodon-tl--as-string
+ (mastodon-tl--toot-id mastodon-tl-test-base-boosted-toot))
+ "4543919")))
+
+(ert-deftest toot-id ()
+ "If a toot is boostedm, return the reblog id."
+ (should (string= (mastodon-tl--as-string
+ (mastodon-tl--toot-id mastodon-tl-test-base-toot))
+ "61208")))
+
+(ert-deftest as-string-1 ()
+ "Should accept a string or number and return a string."
+ (let ((id "1000"))
+ (should (string= (mastodon-tl--as-string id) id))))
+
+(ert-deftest as-string-2 ()
+ "Should accept a string or number and return a string."
+ (let ((id 1000))
+ (should (string= (mastodon-tl--as-string id) (number-to-string id)))))
+
(ert-deftest more-json ()
"Should request toots older than max_id."
(let ((mastodon-instance-url "https://instance.url"))