-
Notifications
You must be signed in to change notification settings - Fork 2
/
test_gists_comments.tavern.yaml
32 lines (30 loc) · 1.04 KB
/
test_gists_comments.tavern.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
test_name: Commenting on a public gist
stages:
- name: Give a new comment on a public gist
request:
url: "{tavern.env_vars.GITHUB_API}/{tavern.env_vars.GISTS_ENDPOINT}/{tavern.env_vars.GIST_ID}/comments"
headers:
content-type: application/json
authorization: "token {tavern.env_vars.GITHUB_TOKEN}"
method: POST
json:
body: "This is an awesome workshop!"
response:
status_code: 201
body:
# Check out request variables!
body: "{tavern.request_vars.json.body}"
- name: Give another comment to the same public gist
request:
url: "{tavern.env_vars.GITHUB_API}/{tavern.env_vars.GISTS_ENDPOINT}/{tavern.env_vars.GIST_ID}/comments"
headers:
content-type: application/json
authorization: "token {tavern.env_vars.GITHUB_TOKEN}"
method: POST
json:
body: "I totally agree!"
response:
status_code: 201
body:
# Notice how the request variables are isolated per stage?
body: "{tavern.request_vars.json.body}"