From 61c2dfb3926869e8c8b118e21b742c0c86fb1642 Mon Sep 17 00:00:00 2001 From: alibw <69758323+alibw@users.noreply.github.com> Date: Sat, 16 Nov 2024 11:46:47 +0330 Subject: [PATCH 1/2] Added in operator tests --- Rest.http | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Rest.http b/Rest.http index 9526c70..5c96baa 100644 --- a/Rest.http +++ b/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 From fafb2ecd1b35b77582a073d5c39c153f5633bc13 Mon Sep 17 00:00:00 2001 From: alibw Date: Sat, 16 Nov 2024 14:43:25 +0330 Subject: [PATCH 2/2] new line --- Rest.http | 1 + 1 file changed, 1 insertion(+) diff --git a/Rest.http b/Rest.http index 5c96baa..bf23676 100644 --- a/Rest.http +++ b/Rest.http @@ -48,6 +48,7 @@ GET /products?id=in.(1,2,79) expect(responseItems[1].id).to.equal(2); }) }} + ### POST /products Content-Type: application/json