Added in operator tests
This commit is contained in:
26
Rest.http
26
Rest.http
@@ -22,7 +22,33 @@ GET /products?unit_price=is.null
|
||||
?? body length == 0
|
||||
|
||||
###
|
||||
GET /products?product_name=in.(Chai,Chang)
|
||||
?? status == 200
|
||||
?? body length == 3
|
||||
{{
|
||||
const {expect} = require('chai');
|
||||
let responseItems = JSON.parse(response.body);
|
||||
test("OK in", () =>
|
||||
{
|
||||
expect(responseItems[0].id).to.equal(1);
|
||||
expect(responseItems[2].id).to.equal(3);
|
||||
})
|
||||
}}
|
||||
|
||||
###
|
||||
GET /products?id=in.(1,2,79)
|
||||
?? status == 200
|
||||
?? body length == 2
|
||||
{{
|
||||
const {expect} = require('chai');
|
||||
let responseItems = JSON.parse(response.body);
|
||||
test("OK in", () =>
|
||||
{
|
||||
expect(responseItems[0].id).to.equal(1);
|
||||
expect(responseItems[1].id).to.equal(2);
|
||||
})
|
||||
}}
|
||||
###
|
||||
POST /products
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user