mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
test: fix test and use stronger passwords
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
6a56ce5541
commit
3ba9f95f83
10 changed files with 68 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -20,6 +20,8 @@ describe('Media', () => {
|
|||
let user: User;
|
||||
|
||||
beforeAll(async () => {
|
||||
const username = 'hardcoded';
|
||||
const password = 'AHardcodedStrongP@ssword123';
|
||||
testSetup = await TestSetupBuilder.create().build();
|
||||
|
||||
uploadPath =
|
||||
|
@ -39,13 +41,13 @@ describe('Media', () => {
|
|||
null,
|
||||
'test_upload_media',
|
||||
);
|
||||
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);
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue