Skip to content

Commit 1647c43

Browse files
committed
test cases for #744
1 parent aa5e4d5 commit 1647c43

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
===
2+
POST /records/comments
3+
4+
[{"user_id":1,"post_id":6,"message":"multi 1","category_id":3},{"user_id":1,"post_id":6,"message":"multi 2","category_id":3}]
5+
===
6+
200
7+
Content-Type: application/json; charset=utf-8
8+
Content-Length: 5
9+
10+
[7,8]
11+
===
12+
GET /records/comments?include=id&filter=post_id,eq,6
13+
===
14+
200
15+
Content-Type: application/json; charset=utf-8
16+
Content-Length: 31
17+
18+
{"records":[{"id":7},{"id":8}]}
19+
===
20+
POST /records/comments
21+
22+
[{"user_id":1,"post_id":6,"message":"multi 3","category_id":3},{"user_id":1,"post_id":0,"message":"multi 4","category_id":3}]
23+
===
24+
===
25+
GET /records/comments?include=id&filter=post_id,eq,6
26+
===
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
===
2+
PUT /records/comments/7,8
3+
4+
[{"user_id":1,"post_id":6,"message":"multi 1","category_id":3},{"user_id":1,"post_id":6,"message":"multi 2","category_id":3}]
5+
===
6+
200
7+
Content-Type: application/json; charset=utf-8
8+
Content-Length: 5
9+
10+
[1,1]
11+
===
12+
GET /records/comments?include=id&filter=post_id,eq,6
13+
===
14+
200
15+
Content-Type: application/json; charset=utf-8
16+
Content-Length: 31
17+
18+
{"records":[{"id":7},{"id":8}]}
19+
===
20+
PUT /records/comments/7,8
21+
22+
[{"user_id":1,"post_id":6,"message":"multi 3","category_id":3},{"user_id":1,"post_id":0,"message":"multi 4","category_id":3}]
23+
===
24+
200
25+
Content-Type: application/json; charset=utf-8
26+
Content-Length: 5
27+
28+
[0,0]
29+
===
30+
GET /records/comments?include=message&filter=post_id,eq,6
31+
===
32+
200
33+
Content-Type: application/json; charset=utf-8
34+
Content-Length: 14
35+
36+
{"records":[]}

0 commit comments

Comments
 (0)