-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_comments.tavern.yaml
52 lines (45 loc) · 1.1 KB
/
test_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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
test_name: Adding a comment to an article that dosen't exist
stages:
- name: Add a comment to an article that dosen't exist
request:
url: http://localhost/comment
auth:
- Shekhar__
- ab
json:
comment: 'Hey!!!!! I am from San Jose1111'
article_id: 89
method: POST
headers:
content-type: application/json
response:
status_code: 201
---
test_name: Post an authenticated comment on an article
stages:
- name: Post an authenticated comment on an article
request:
url: http://localhost/comment
auth:
- Shekhar__
- ab
json:
comment: "Hey!!!!! this article is from valid user"
article_id: 1
method: POST
headers:
content-type: application/json
response:
status_code: 201
---
test_name: Comment order
stages:
- name: return comments in order
request:
url: "http://localhost/comment?article_id=1"
method: GET
headers:
content-type: application/json
response:
status_code: 200