From 2f1e6628a1e0e82a28046025f5bdb73c27ad897c Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 3 Apr 2022 17:39:16 +0200 Subject: [PATCH] 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 --- test/private-api/notes.e2e-spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/private-api/notes.e2e-spec.ts b/test/private-api/notes.e2e-spec.ts index 98da7ecf6..5536d25c2 100644 --- a/test/private-api/notes.e2e-spec.ts +++ b/test/private-api/notes.e2e-spec.ts @@ -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/)