Skip to content

Commit 1b4bd58

Browse files
committed
test: use unique emails for users in tests and remove afterwards
1 parent 2b04db4 commit 1b4bd58

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/addRepoTest.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('add new repo', async () => {
2828
await db.deleteUser('u1');
2929
await db.deleteUser('u2');
3030
await db.createUser('u1', 'abc', '[email protected]', 'test', true);
31-
await db.createUser('u2', 'abc', 'test@test.com', 'test', true);
31+
await db.createUser('u2', 'abc', 'test2@test.com', 'test', true);
3232
});
3333

3434
it('login', async function () {
@@ -187,5 +187,8 @@ describe('add new repo', async () => {
187187

188188
after(async function () {
189189
await service.httpServer.close();
190+
await db.deleteRepo('test-repo');
191+
await db.deleteUser('u1');
192+
await db.deleteUser('u2');
190193
});
191194
});

test/testUserCreation.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ describe('user creation', async () => {
5555
});
5656

5757
it('login as new user', async function () {
58-
// we don't know the users tempoary password - so force update a
59-
// pasword
58+
// we don't know the users temporary password - so force update a password
6059
const user = await db.findUser('login-test-user');
6160

6261
await bcrypt.hash('test1234', 10, async function (err, hash) {

0 commit comments

Comments
 (0)