diff options
Diffstat (limited to 'api/tests/routes/auth/login.test.js')
-rw-r--r-- | api/tests/routes/auth/login.test.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/api/tests/routes/auth/login.test.js b/api/tests/routes/auth/login.test.js deleted file mode 100644 index d4b52444..00000000 --- a/api/tests/routes/auth/login.test.js +++ /dev/null @@ -1,33 +0,0 @@ -const supertest = require("supertest"); -const request = supertest("http://localhost:3001"); - -describe("/api/auth/login", () => { - describe("POST", () => { - test("without body", async () => { - const response = await request.post("/api/auth/login").send({}); - expect(response.statusCode).toBe(400); - }); - test("with body", async () => { - const user = { - login: "fortnitefortnite@gmail.com", - password: "verysecurepassword" - }; - - await request.post("/api/auth/register").send({ - fingerprint: "805826570869932034.wR8vi8lGlFBJerErO9LG5NViJFw", - email: user.login, - username: user.login.split("@")[0], - password: user.password, - invite: null, - consent: true, - date_of_birth: "2000-04-04", - gift_code_sku_id: null, - captcha_key: null - }); - - const response = await request.post("/api/auth/login").send(user); - - expect(response.statusCode).toBe(200); - }); - }); -}); |