From 0eaad219114239b693a68110a42b984a4f4f5b29 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 2 Jan 2023 20:25:51 +0100 Subject: Continue adding tests --- test/root.js | 91 ------------------------------------------------------------ 1 file changed, 91 deletions(-) delete mode 100644 test/root.js (limited to 'test/root.js') diff --git a/test/root.js b/test/root.js deleted file mode 100644 index d5af081..0000000 --- a/test/root.js +++ /dev/null @@ -1,91 +0,0 @@ -import test from "ava"; -import supertest from "supertest"; - -import app from "../main.js"; - -const request = supertest(app); - -test("get / when not logged should redirect to /login", async function(t) { - await request.get("/") - .expect("Content-Type", /text\/plain/) - .expect(302, /Redirecting to \/login$/); - t.pass(); -}); -test("get /login when not logged in should display the login page", async function(t) { - await request.get("/login") - .expect("Content-Type", /text\/html/) - .expect(200, /