add tests

This commit is contained in:
2020-03-07 18:29:18 +01:00
parent ae22e22f5c
commit ca2674e502
4 changed files with 17 additions and 26 deletions

View File

@ -27,21 +27,17 @@ test ('login', async (t) => {
});
test ('reject invalid user', async (t) => {
const session = await client.login (
await t.throwsAsync (client.login (
'foo',
'foo',
'http://localhost:3000'
);
t.is (typeof session, 'string');
));
});
test ('reject invalid password', async (t) => {
const session = await client.login (
await t.throwsAsync (client.login (
'testuser',
'bar',
'http://localhost:3000'
);
t.is (typeof session, 'string');
));
});