mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
PrivateAPI: Add pinStatus to HistoryEntryImportDto
As the DTO is only for importing an existing history the pinStatus of those entries should also be posted. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
1154894876
commit
eeaa74b385
5 changed files with 70 additions and 8 deletions
|
@ -100,8 +100,10 @@ describe('History', () => {
|
|||
});
|
||||
|
||||
it('POST /me/history', async () => {
|
||||
const pinStatus = true;
|
||||
const postEntryDto = new HistoryEntryImportDto();
|
||||
postEntryDto.note = note2.alias;
|
||||
postEntryDto.pinStatus = pinStatus;
|
||||
await request(app.getHttpServer())
|
||||
.post('/me/history')
|
||||
.set('Content-Type', 'application/json')
|
||||
|
@ -110,6 +112,8 @@ describe('History', () => {
|
|||
const userEntries = await historyService.getEntriesByUser(user);
|
||||
expect(userEntries.length).toEqual(1);
|
||||
expect(userEntries[0].note.alias).toEqual(note2.alias);
|
||||
expect(userEntries[0].user.userName).toEqual(user.userName);
|
||||
expect(userEntries[0].pinStatus).toEqual(pinStatus);
|
||||
});
|
||||
|
||||
it('DELETE /me/history', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue