mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
Implement /notes API routes
This adds all currently specified routes under /notes. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4cd574306e
commit
82f03152a8
3 changed files with 97 additions and 4 deletions
src/api/public/notes
|
@ -1,4 +1,9 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { getRepositoryToken } from '@nestjs/typeorm';
|
||||
import { Note } from '../../../notes/note.entity';
|
||||
import { NotesService } from '../../../notes/notes.service';
|
||||
import { Revision } from '../../../revisions/revision.entity';
|
||||
import { RevisionsModule } from '../../../revisions/revisions.module';
|
||||
import { NotesController } from './notes.controller';
|
||||
|
||||
describe('Notes Controller', () => {
|
||||
|
@ -7,7 +12,14 @@ describe('Notes Controller', () => {
|
|||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [NotesController],
|
||||
}).compile();
|
||||
providers: [NotesService],
|
||||
imports: [RevisionsModule],
|
||||
})
|
||||
.overrideProvider(getRepositoryToken(Note))
|
||||
.useValue({})
|
||||
.overrideProvider(getRepositoryToken(Revision))
|
||||
.useValue({})
|
||||
.compile();
|
||||
|
||||
controller = module.get<NotesController>(NotesController);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue