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

(ert-deftest mastodon-http:get:retrieves-endpoint ()
  "Should make a `url-retrieve' of the given URL."
  (let ((callback-double (lambda () "double")))
    (with-mock
      (mock (url-retrieve-synchronously "https://foo.bar/baz"))
      (mock (mastodon--access-token) => "test-token")
      (mastodon-http--get "https://foo.bar/baz"))))