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

(load-file "../lisp/mastodon-http.el")

(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"))))