mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
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:
parent
d780d511cd
commit
2f1e6628a1
1 changed files with 3 additions and 0 deletions
|
@ -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/)
|
||||
|
|
Loading…
Reference in a new issue