Merge remote-tracking branch 'origin/dev' into fix/testdata-niet-meer-correct-opgezet
# Conflicts: # backend/tests/controllers/teachers.test.ts
This commit is contained in:
commit
67cf87dc9b
67 changed files with 884 additions and 335 deletions
|
@ -15,7 +15,6 @@ import {
|
|||
import { BadRequestException } from '../../src/exceptions/bad-request-exception.js';
|
||||
import { EntityAlreadyExistsException } from '../../src/exceptions/entity-already-exists-exception.js';
|
||||
import { getStudentRequestsHandler } from '../../src/controllers/students.js';
|
||||
import { TeacherDTO } from '@dwengo-1/common/interfaces/teacher';
|
||||
import { getClassHandler } from '../../src/controllers/classes';
|
||||
import { getFooFighters, getTestleerkracht1 } from '../test_assets/users/teachers.testdata.js';
|
||||
import { getClass02 } from '../test_assets/classes/classes.testdata.js';
|
||||
|
@ -101,7 +100,7 @@ describe('Teacher controllers', () => {
|
|||
});
|
||||
|
||||
it('Teacher list', async () => {
|
||||
req = { query: { full: 'true' } };
|
||||
req = { query: { full: 'false' } };
|
||||
|
||||
await getAllTeachersHandler(req as Request, res as Response);
|
||||
|
||||
|
@ -109,10 +108,8 @@ describe('Teacher controllers', () => {
|
|||
|
||||
const result = jsonMock.mock.lastCall?.[0];
|
||||
|
||||
const teacherUsernames = result.teachers.map((s: TeacherDTO) => s.username);
|
||||
|
||||
const teacher = getTestleerkracht1();
|
||||
expect(teacherUsernames).toContain(teacher.username);
|
||||
expect(result.teachers).toContain(teacher.username);
|
||||
|
||||
expect(result.teachers).toHaveLength(5);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue