feature/45-auth_tests #50

Merged
niggl merged 8 commits from feature/45-auth_tests into dev 2020-12-22 19:32:22 +00:00
Showing only changes of commit 69796a888f - Show all commits

View File

@ -46,4 +46,11 @@ describe('POST /api/auth/login nonexistant user', () => {
const res = await axios.post(base + '/api/auth/login', { email: "test@example.com", password: "demo" }, axios_config); const res = await axios.post(base + '/api/auth/login', { email: "test@example.com", password: "demo" }, axios_config);
expect(res.status).toEqual(404); expect(res.status).toEqual(404);
}); });
});
// ---------------
describe('POST /api/auth/login wrong password', () => {
it('login with wrong password should return 401', async () => {
const res = await axios.post(base + '/api/auth/login', { username: "demo", password: "totallynotthecorrectpassword" }, axios_config);
expect(res.status).toEqual(401);
});
}); });