summaryrefslogtreecommitdiff
path: root/yarns/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-01-19 17:29:47 +0200
committerLars Wirzenius <liw@liw.fi>2018-01-19 17:29:47 +0200
commit3bc16ac24091009e73d9c4b9c2fbda0cdca6cff5 (patch)
treeee7530bbb5128a369e104ec547ca05f666f54941 /yarns/900-implements.yarn
parent7eb210040641c1fd77c0ff9a71260915ecb8bf11 (diff)
downloadick2-3bc16ac24091009e73d9c4b9c2fbda0cdca6cff5.tar.gz
Add: yarn scenario for building two project sequentially
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r--yarns/900-implements.yarn27
1 files changed, 27 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index 39b590b..b27b830 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -139,3 +139,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
value = get_next_match()
headers = vars['headers']
assertEqual(headers[name].lower(), value.lower())
+
+ IMPLEMENTS THEN result is step (.+)
+ step = json.loads(get_next_match())
+ body = json.loads(vars['body'])
+ actual_step = body['step']
+ print('expected step', step)
+ print('actual body', body)
+ print('actual step', actual_step)
+ diff = dict_diff(step, actual_step)
+ print('diff', diff)
+ assertEqual(diff, None)
+
+ IMPLEMENTS WHEN (\S+) requests list of builds
+ user = get_next_match()
+ token = get_token(user)
+ url = vars['url']
+ path = '/builds'
+ http(vars, get, url + path, token=token)
+
+ IMPLEMENTS THEN the list of builds is (.+)
+ expected = json.loads(get_next_match())
+ print('expected', expected)
+ body = json.loads(vars['body'])
+ print('body', body)
+ actual = [o['build_id'] for o in body['builds']]
+ print('actual', actual)
+ assertEqual(actual, expected)