mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-11 07:40:56 +00:00
test(notes-service): Add test for toNoteMetadataDto with no alias
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
161329fa7c
commit
40c23acd49
1 changed files with 5 additions and 0 deletions
|
@ -483,6 +483,11 @@ describe('NotesService', () => {
|
|||
expect(metadataDto.updateUsername).toEqual(user.username);
|
||||
expect(metadataDto.viewCount).toEqual(note.viewCount);
|
||||
});
|
||||
it('returns publicId if no alias exists', async () => {
|
||||
const [note, ,] = await getMockData();
|
||||
const metadataDto = await service.toNoteMetadataDto(note);
|
||||
expect(metadataDto.primaryAddress).toEqual(note.publicId);
|
||||
});
|
||||
});
|
||||
|
||||
describe('toNoteDto', () => {
|
||||
|
|
Loading…
Reference in a new issue