mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 17:55:17 -04:00
fix username spelling from userName
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
aa8455a079
commit
d33cfa4541
23 changed files with 89 additions and 91 deletions
|
@ -20,7 +20,6 @@ import mediaConfigMock from '../../src/config/mock/media.config.mock';
|
|||
import { GroupsModule } from '../../src/groups/groups.module';
|
||||
import { HistoryEntryUpdateDto } from '../../src/history/history-entry-update.dto';
|
||||
import { HistoryEntryDto } from '../../src/history/history-entry.dto';
|
||||
import { HistoryEntry } from '../../src/history/history-entry.entity';
|
||||
import { HistoryModule } from '../../src/history/history.module';
|
||||
import { HistoryService } from '../../src/history/history.service';
|
||||
import { LoggerModule } from '../../src/logger/logger.module';
|
||||
|
@ -217,7 +216,7 @@ describe('Me', () => {
|
|||
const noteMetaDtos = response.body as NoteMetadataDto[];
|
||||
expect(noteMetaDtos).toHaveLength(1);
|
||||
expect(noteMetaDtos[0].primaryAlias).toEqual(noteName);
|
||||
expect(noteMetaDtos[0].updateUser?.userName).toEqual(user.userName);
|
||||
expect(noteMetaDtos[0].updateUser?.username).toEqual(user.username);
|
||||
});
|
||||
|
||||
it('GET /me/media', async () => {
|
||||
|
|
|
@ -201,7 +201,7 @@ describe('Notes', () => {
|
|||
const updateNotePermission = new NotePermissionsUpdateDto();
|
||||
updateNotePermission.sharedToUsers = [
|
||||
{
|
||||
username: user.userName,
|
||||
username: user.username,
|
||||
canEdit: true,
|
||||
},
|
||||
];
|
||||
|
@ -214,8 +214,8 @@ describe('Notes', () => {
|
|||
expect(updatedNote.userPermissions[0].canEdit).toEqual(
|
||||
updateNotePermission.sharedToUsers[0].canEdit,
|
||||
);
|
||||
expect(updatedNote.userPermissions[0].user.userName).toEqual(
|
||||
user.userName,
|
||||
expect(updatedNote.userPermissions[0].user.username).toEqual(
|
||||
user.username,
|
||||
);
|
||||
expect(updatedNote.groupPermissions).toHaveLength(0);
|
||||
await request(app.getHttpServer()).delete('/notes/test3').expect(204);
|
||||
|
@ -280,13 +280,13 @@ describe('Notes', () => {
|
|||
expect(metadata.body.description).toEqual('');
|
||||
expect(typeof metadata.body.createTime).toEqual('string');
|
||||
expect(metadata.body.editedBy).toEqual([]);
|
||||
expect(metadata.body.permissions.owner.userName).toEqual('hardcoded');
|
||||
expect(metadata.body.permissions.owner.username).toEqual('hardcoded');
|
||||
expect(metadata.body.permissions.sharedToUsers).toEqual([]);
|
||||
expect(metadata.body.permissions.sharedToUsers).toEqual([]);
|
||||
expect(metadata.body.tags).toEqual([]);
|
||||
expect(typeof metadata.body.updateTime).toEqual('string');
|
||||
expect(typeof metadata.body.updateUser.displayName).toEqual('string');
|
||||
expect(typeof metadata.body.updateUser.userName).toEqual('string');
|
||||
expect(typeof metadata.body.updateUser.username).toEqual('string');
|
||||
expect(typeof metadata.body.updateUser.email).toEqual('string');
|
||||
expect(typeof metadata.body.updateUser.photo).toEqual('string');
|
||||
expect(typeof metadata.body.viewCount).toEqual('number');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue