aboutsummaryrefslogtreecommitdiff
path: root/test/test-api.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-api.el')
-rw-r--r--test/test-api.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-api.el b/test/test-api.el
index b7d5dbb..30590d7 100644
--- a/test/test-api.el
+++ b/test/test-api.el
@@ -14,3 +14,11 @@
(ert-deftest test-method-get-all ()
"Tests sx-method interface to `sx-request-all-items'"
(should (< 250 (length (sx-method-call 'sites :get-all t)))))
+
+(ert-deftest request-get ()
+ (should (sx-request-get-url "http://google.com"))
+ (should-error (sx-request-get-url "http://github.com/Bruce-Connor/does-not-exist"))
+ (should-error (sx-request-get-data "tags/emacs-does-not-exist"))
+ (let ((emacs-tags (length (sx-request-get-data 'tags/emacs))))
+ (should (> emacs-tags 450))
+ (should (not (cl-remove-if #'stringp emacs-tags)))))