Added new tests

This commit is contained in:
2024-10-13 12:35:14 +03:30
parent 5caa06db66
commit dda925b8d6
3 changed files with 39 additions and 2 deletions

View File

@@ -21,4 +21,22 @@ GET /products
test('OK content-range', () => {
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