test cases for #744
This commit is contained in:
parent
aa5e4d5cd6
commit
1647c43e0e
2 changed files with 62 additions and 0 deletions
26
tests/functional/001_records/090_add_multiple_comments.log
Normal file
26
tests/functional/001_records/090_add_multiple_comments.log
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
===
|
||||
POST /records/comments
|
||||
|
||||
[{"user_id":1,"post_id":6,"message":"multi 1","category_id":3},{"user_id":1,"post_id":6,"message":"multi 2","category_id":3}]
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 5
|
||||
|
||||
[7,8]
|
||||
===
|
||||
GET /records/comments?include=id&filter=post_id,eq,6
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 31
|
||||
|
||||
{"records":[{"id":7},{"id":8}]}
|
||||
===
|
||||
POST /records/comments
|
||||
|
||||
[{"user_id":1,"post_id":6,"message":"multi 3","category_id":3},{"user_id":1,"post_id":0,"message":"multi 4","category_id":3}]
|
||||
===
|
||||
===
|
||||
GET /records/comments?include=id&filter=post_id,eq,6
|
||||
===
|
||||
36
tests/functional/001_records/091_edit_multiple_comments.log
Normal file
36
tests/functional/001_records/091_edit_multiple_comments.log
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
===
|
||||
PUT /records/comments/7,8
|
||||
|
||||
[{"user_id":1,"post_id":6,"message":"multi 1","category_id":3},{"user_id":1,"post_id":6,"message":"multi 2","category_id":3}]
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 5
|
||||
|
||||
[1,1]
|
||||
===
|
||||
GET /records/comments?include=id&filter=post_id,eq,6
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 31
|
||||
|
||||
{"records":[{"id":7},{"id":8}]}
|
||||
===
|
||||
PUT /records/comments/7,8
|
||||
|
||||
[{"user_id":1,"post_id":6,"message":"multi 3","category_id":3},{"user_id":1,"post_id":0,"message":"multi 4","category_id":3}]
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 5
|
||||
|
||||
[0,0]
|
||||
===
|
||||
GET /records/comments?include=message&filter=post_id,eq,6
|
||||
===
|
||||
200
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 14
|
||||
|
||||
{"records":[]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue