test(private/notes): add regression test

For reasons, the typeorm 0.3 started to always return all notes in the database.
This adds a regression test to check for that.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-04-03 17:39:16 +02:00
parent d780d511cd
commit 2f1e6628a1

View file

@ -199,6 +199,9 @@ describe('Notes', () => {
describe('GET /notes/{note}/revisions', () => {
it('works with existing alias', async () => {
await testSetup.notesService.createNote(content, user, 'test4');
// create a second note to check for a regression, where typeorm always returned
// all revisions in the database
await testSetup.notesService.createNote(content, user, 'test4a');
const response = await agent
.get('/api/private/notes/test4/revisions')
.expect('Content-Type', /json/)