Skip to content

Commit 8347bce

Browse files
committed
Adds test case
1 parent 2842c2d commit 8347bce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

config/openresty/tests/basic.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ describe("cacher", function () {
7777
expect(await this.listCache({ watch: false })).toEqual([]);
7878
});
7979

80+
it("can purge multiple hosts", async function () {
81+
const purgeResponse = await fetch(this.origin + "/purge?host=example1.com&host=example2.com");
82+
const purgeText = await purgeResponse.text();
83+
84+
expect(purgeResponse.status).toBe(200);
85+
expect(purgeText.trim()).toBe("example1.com: 0\nexample2.com: 0");
86+
});
87+
8088
it("purges a large number of cached requests", async function () {
8189
const number_of_requests = 500;
8290

0 commit comments

Comments
 (0)