aboutsummaryrefslogtreecommitdiffstats
path: root/test/playwright/tests/api.spec.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'test/playwright/tests/api.spec.mjs')
-rw-r--r--test/playwright/tests/api.spec.mjs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/playwright/tests/api.spec.mjs b/test/playwright/tests/api.spec.mjs
new file mode 100644
index 000000000..7cc5f0eef
--- /dev/null
+++ b/test/playwright/tests/api.spec.mjs
@@ -0,0 +1,10 @@
+import {expect, test} from "@playwright/test";
+
+test("API /stat endpoint is available and returns version", async ({request}, testInfo) => {
+ const {readOnlyPassword} = testInfo.project.use.rspamdPasswords;
+
+ const response = await request.get("/stat", {headers: {Password: readOnlyPassword}});
+ expect(response.ok()).toBeTruthy();
+ const data = await response.json();
+ expect(data).toHaveProperty("version");
+});