test: fix test and use stronger passwords

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-09-25 02:05:30 +02:00 committed by David Mehren
parent 6a56ce5541
commit 3ba9f95f83
10 changed files with 68 additions and 38 deletions

View file

@ -28,11 +28,12 @@ describe('Me', () => {
uploadPath =
testSetup.configService.get('mediaConfig').backend.filesystem.uploadPath;
const username = 'hardcoded';
const password = 'AHardcodedStrongP@ssword123';
await testSetup.app.init();
user = await testSetup.userService.createUser('hardcoded', 'Testy');
await testSetup.identityService.createLocalIdentity(user, 'test');
user = await testSetup.userService.createUser(username, 'Testy');
await testSetup.identityService.createLocalIdentity(user, password);
content = 'This is a test note.';
alias2 = 'note2';
@ -41,7 +42,7 @@ describe('Me', () => {
agent = request.agent(testSetup.app.getHttpServer());
await agent
.post('/api/private/auth/local/login')
.send({ username: 'hardcoded', password: 'test' })
.send({ username: username, password: password })
.expect(201);
});