aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-02 00:59:59 -0500
committerSean Allred <code@seanallred.com>2015-01-02 00:59:59 -0500
commit27eb38cfc4bba9013e8454bbe81ce497bf224474 (patch)
treead5d57ad2f04e6d700456a824c7885fe6f793efa /test
parent5babd59dfd51b5dd33cfd411fc2c2754adf63381 (diff)
Introduce `sx-request-all-items'
This function repeatedly makes API requests until a condition is satisfied (such as 'no more items'). First and foremost, this will allow us to retrieve all tags for a site.
Diffstat (limited to 'test')
-rw-r--r--test/test-api.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-api.el b/test/test-api.el
index ca775ff..b99ec7a 100644
--- a/test/test-api.el
+++ b/test/test-api.el
@@ -11,3 +11,8 @@
(should-error
(sx-request-make "questions" '(()))))
+(ert-deftest test-request-all ()
+ "Test request all items"
+ (should
+ (< 250
+ (length (sx-request-all-items "sites")))))