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:
David Mehren 2020-07-26 21:00:18 +02:00
parent 4cd574306e
commit 82f03152a8
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 97 additions and 4 deletions
src/api/public/notes

View file

@ -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);
});