Browse Source

test cases for #744

Maurits van der Schee 3 years ago
parent
commit
1647c43e0e

+ 26
- 0
tests/functional/001_records/090_add_multiple_comments.log View File

@@ -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
+===

+ 36
- 0
tests/functional/001_records/091_edit_multiple_comments.log View File

@@ -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":[]}

Loading…
Cancel
Save