summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-09-22 15:51:14 +0000
committerLars Wirzenius <liw@liw.fi>2017-09-25 14:46:11 +0000
commitf3d82cab9b684f92d1a0d8b481b95fde56a5aa79 (patch)
treeb3996972a46e4c8537b163ab8ea20eb6ba08fc6d /yarns
parent9a23acc18c36c1c0c648da162bc1075185e824a6 (diff)
downloadqvisqve-f3d82cab9b684f92d1a0d8b481b95fde56a5aa79.tar.gz
Add: test that sub-resource hit returns id of parent
Diffstat (limited to 'yarns')
-rw-r--r--yarns/smoke.yarn10
1 files changed, 10 insertions, 0 deletions
diff --git a/yarns/smoke.yarn b/yarns/smoke.yarn
index 695f31a..d689450 100644
--- a/yarns/smoke.yarn
+++ b/yarns/smoke.yarn
@@ -163,6 +163,7 @@ don't need to be created specially.
WHEN client requests POST /subjects with token and body
... { "type": "subject", "names": [ { "full_name": "Alfred" } ] }
THEN resource id is ID1
+ AND revision is REV1
WHEN client requests POST /subjects with token and body
... { "type": "subject", "names": [ { "full_name": "Alfred" } ] }
@@ -242,6 +243,15 @@ don't need to be created specially.
... "names": [ { "full_name": "Bruce" } ]
... }
+ GIVEN unique random identifier RANDOM
+ WHEN client requests PUT /subjects/${ID1}/sub with token and body
+ ... { "subfield": "${RANDOM}", "revision": "${REV1}" }
+ THEN HTTP status code is 200 OK
+
+ WHEN client requests GET /subjects/search/exact/subfield/${RANDOM} using token
+ THEN HTTP status code is 200 OK
+ AND search result contains {"id": "${ID1}"}
+
FINALLY qvarn is stopped