diff --git a/Count.http b/Count.http index 412bcaf..2aa2b2d 100644 --- a/Count.http +++ b/Count.http @@ -21,4 +21,22 @@ GET /products test('OK content-range', () => { expect(response.headers['content-range']).to.equal(`0-${itemsCount - 1}/*`); }); -}} \ No newline at end of file +}} + +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 diff --git a/Ordering.http b/Ordering.http index 2b496d0..f5f846f 100644 --- a/Ordering.http +++ b/Ordering.http @@ -29,4 +29,13 @@ GET /products?order=product_name.desc ?? js response.parsedBody[0].id == 47 ?? js response.parsedBody[76].id == 17 ?? js response.parsedBody[0].product_name startsWith Z -?? js response.parsedBody[76].product_name startsWith A \ No newline at end of file +?? 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 diff --git a/Rest.http b/Rest.http index c7f636a..9526c70 100644 --- a/Rest.http +++ b/Rest.http @@ -11,6 +11,16 @@ GET /products ?? status == 200 ?? 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