aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-12 22:43:23 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-14 13:18:14 -0400
commit523bf47c32d52d9bc99912d901ec5e6708f21fa5 (patch)
treef08017dbc2ebe587eb13efcc2f7b828a5b0047e9 /test
parentb503c07c8480c8f57e72c3fdafa153ad9d47030f (diff)
Add GET function
Diffstat (limited to 'test')
-rw-r--r--test/mastodon-http-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/mastodon-http-tests.el b/test/mastodon-http-tests.el
new file mode 100644
index 0000000..afc8fe3
--- /dev/null
+++ b/test/mastodon-http-tests.el
@@ -0,0 +1,10 @@
+(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 "https://foo.bar/baz" 'callback-double))
+ (mastodon-http--get "https://foo.bar/baz" 'callback-double))))