summaryrefslogtreecommitdiff
path: root/yarns/000.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/000.yarn')
-rw-r--r--yarns/000.yarn25
1 files changed, 24 insertions, 1 deletions
diff --git a/yarns/000.yarn b/yarns/000.yarn
index 79e398d..4e6719c 100644
--- a/yarns/000.yarn
+++ b/yarns/000.yarn
@@ -45,6 +45,11 @@ First make sure the register is empty.
THEN HTTP status is 200
AND body matches { "resources": 0 }
+ WHEN admin requests GET /search with
+ ... {"cond": [{"where": "meta", "op": ">=", "field": "id", "pattern": ""}]}
+ THEN HTTP status is 200
+ AND body matches { "resources": [] }
+
Create a member.
WHEN admin requests POST /memb with body { "fullname": "James Bond" }
@@ -56,6 +61,11 @@ Create a member.
THEN HTTP status is 200
AND body matches { "resources": 1 }
+ WHEN admin requests GET /search with
+ ... {"cond": [{"where": "meta", "op": ">=", "field": "id", "pattern": ""}]}
+ THEN HTTP status is 200
+ AND body matches { "resources": [ "${ID}" ] }
+
WHEN admin requests GET /memb with header Muck-Id: ${ID}
THEN HTTP status is 200
AND body matches { "fullname": "James Bond" }
@@ -82,6 +92,11 @@ Delete the member.
THEN HTTP status is 200
AND body matches { "resources": 0 }
+ WHEN admin requests GET /search with
+ ... {"cond": [{"where": "meta", "op": ">=", "field": "id", "pattern": ""}]}
+ THEN HTTP status is 200
+ AND body matches { "resources": [] }
+
WHEN admin requests GET /memb with header Muck-Id: ${ID}
THEN HTTP status is 404
@@ -138,6 +153,14 @@ TODO:
}
effiapi.GET('/memb', headers, None)
+ IMPLEMENTS WHEN admin requests GET /search with (.+)
+ body = get_expanded_json_match()
+ print('body', repr(body))
+ headers = {
+ 'Content-Type': 'application/json',
+ }
+ effiapi.GET('/search', headers, json.dumps(body))
+
IMPLEMENTS WHEN admin requests DELETE /memb with id (\S+)
rid = get_expanded_match()
print('rid', repr(rid))
@@ -174,7 +197,7 @@ TODO:
assertEqual(actual, expected)
IMPLEMENTS THEN body matches (.+)
- expected = get_json_match()
+ expected = get_expanded_json_match()
actual = effiapi.get_json_body()
print 'expected:', expected
print 'actual: ', actual