From c5842d69e124bcff03c72133c0fd73b3030ade18 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 22 Sep 2020 21:45:56 +0200 Subject: [PATCH] Note E2E tests: Use the correct revision-id when checking `GET /notes/{note}/revisions/{revision-id}` Signed-off-by: David Mehren --- test/public-api/notes.e2e-spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/public-api/notes.e2e-spec.ts b/test/public-api/notes.e2e-spec.ts index d2185777b..fd8d2700f 100644 --- a/test/public-api/notes.e2e-spec.ts +++ b/test/public-api/notes.e2e-spec.ts @@ -122,9 +122,10 @@ describe('Notes', () => { }); it(`GET /notes/{note}/revisions/{revision-id}`, async () => { - await notesService.createNote('This is a test note.', 'test8'); + const note = await notesService.createNote('This is a test note.', 'test8'); + const revision = await notesService.getLastRevision(note); const response = await request(app.getHttpServer()) - .get('/notes/test8/revisions/1') + .get('/notes/test8/revisions/' + revision.id) .expect('Content-Type', /json/) .expect(200); expect(response.body.content).toEqual('This is a test note.');