test: alle testen slagen na aanpassen testdata

This commit is contained in:
laurejablonski 2025-04-08 10:39:22 +02:00
parent 1ff6405066
commit a5e82858ab
8 changed files with 23 additions and 23 deletions

View file

@ -104,9 +104,9 @@ describe('Teacher controllers', () => {
const result = jsonMock.mock.lastCall?.[0];
const teacherUsernames = result.teachers.map((s: TeacherDTO) => s.username);
expect(teacherUsernames).toContain('FooFighters');
expect(teacherUsernames).toContain('testleerkracht1');
expect(result.teachers).toHaveLength(4);
expect(result.teachers).toHaveLength(5);
});
it('Deleting non-existent student', async () => {
@ -117,7 +117,7 @@ describe('Teacher controllers', () => {
it('Get teacher classes', async () => {
req = {
params: { username: 'FooFighters' },
params: { username: 'testleerkracht1' },
query: { full: 'true' },
};
@ -132,7 +132,7 @@ describe('Teacher controllers', () => {
it('Get teacher students', async () => {
req = {
params: { username: 'FooFighters' },
params: { username: 'testleerkracht1' },
query: { full: 'true' },
};
@ -169,7 +169,7 @@ describe('Teacher controllers', () => {
it('Get join requests by class', async () => {
req = {
query: { username: 'LimpBizkit' },
params: { classId: 'id02' },
params: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
};
await getStudentJoinRequestHandler(req as Request, res as Response);
@ -184,7 +184,7 @@ describe('Teacher controllers', () => {
it('Update join request status', async () => {
req = {
query: { username: 'LimpBizkit', studentUsername: 'PinkFloyd' },
params: { classId: 'id02' },
params: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
body: { accepted: 'true' },
};