diff options
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r-- | yarns/900-implements.yarn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index c81d1ef..22d6463 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -12,6 +12,14 @@ IMPLEMENTS FINALLY Muck is stopped stop_muck() +## Create users + + + IMPLEMENTS GIVEN a user (\S+) with superuser access + user = get_next_match() + users = V['superusers'] or [] + V['superusers'] = users + [user] + ## HTTP requests IMPLEMENTS WHEN user (\S+) makes request POST /res with body (.*) @@ -19,6 +27,13 @@ body = get_expanded_match() POST(user, '/res', {}, json.loads(body)) + IMPLEMENTS WHEN user (\S+) makes request POST /res with header "(\S+): (.+)" and body (.*) + user = get_expanded_match() + header = get_expanded_match() + value = get_expanded_match() + body = get_expanded_match() + POST(user, '/res', {header:value}, json.loads(body)) + IMPLEMENTS WHEN user (\S+) makes request GET /res with header "(\S+): (.+)" user = get_expanded_match() header = get_expanded_match() |