Added new tests
This commit is contained in:
18
Count.http
18
Count.http
@@ -22,3 +22,21 @@ GET /products
|
|||||||
expect(response.headers['content-range']).to.equal(`0-${itemsCount - 1}/*`);
|
expect(response.headers['content-range']).to.equal(`0-${itemsCount - 1}/*`);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
GET /products?offset=3&limit=8&unit_price=lt.14
|
||||||
|
Prefer: count=exact
|
||||||
|
?? status == 206
|
||||||
|
?? header content-range == 3-10/21
|
||||||
|
|
||||||
|
GET /products?offset=3&limit=25&unit_price=lt.14
|
||||||
|
Prefer: count=exact
|
||||||
|
?? status == 206
|
||||||
|
?? header content-range == 3-20/21
|
||||||
|
|
||||||
|
GET /products?offset=98&unit_price=lt.14
|
||||||
|
Prefer: count=exact
|
||||||
|
?? header content-range == */21
|
||||||
|
|
||||||
|
GET /products?limit=0&unit_price=lt.14
|
||||||
|
Prefer: count=exact
|
||||||
|
?? header content-range == */21
|
||||||
|
|||||||
@@ -30,3 +30,12 @@ GET /products?order=product_name.desc
|
|||||||
?? js response.parsedBody[76].id == 17
|
?? js response.parsedBody[76].id == 17
|
||||||
?? js response.parsedBody[0].product_name startsWith Z
|
?? js response.parsedBody[0].product_name startsWith Z
|
||||||
?? js response.parsedBody[76].product_name startsWith A
|
?? js response.parsedBody[76].product_name startsWith A
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
GET /products?order=id.desc&unit_price=lt.10
|
||||||
|
?? status == 200
|
||||||
|
?? js response.parsedBody[0].id == 75
|
||||||
|
?? js response.parsedBody[10].id == 13
|
||||||
|
?? js response.parsedBody[0].product_name startsWith R
|
||||||
|
?? js response.parsedBody[10].product_name startsWith K
|
||||||
|
|||||||
10
Rest.http
10
Rest.http
@@ -11,6 +11,16 @@ GET /products
|
|||||||
?? status == 200
|
?? status == 200
|
||||||
?? body length == 77
|
?? body length == 77
|
||||||
|
|
||||||
|
###
|
||||||
|
GET /products?discontinued=neq.0
|
||||||
|
?? status == 200
|
||||||
|
?? body length == 10
|
||||||
|
|
||||||
|
###
|
||||||
|
GET /products?unit_price=is.null
|
||||||
|
?? status == 200
|
||||||
|
?? body length == 0
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
POST /products
|
POST /products
|
||||||
|
|||||||
Reference in New Issue
Block a user