diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-23 23:41:13 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-24 00:56:08 -0200 |
commit | 76bfce36a4808e71aec27fdc2f7f8cef8462500f (patch) | |
tree | 9c46a1d17324b7d2205d83ca34f37c708e5ca544 /test | |
parent | 4bc72b0f622b2565e7b0d0263bb3053ca5252f63 (diff) |
Add tests for sx-request-get-...
Diffstat (limited to 'test')
-rw-r--r-- | test/test-api.el | 8 |
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))))) |