Merge remote-tracking branch 'origin/dev' into feat/endpoints-beschermen-met-authenticatie-#105
This commit is contained in:
commit
c13788f269
26 changed files with 9315 additions and 630 deletions
|
@ -16,6 +16,7 @@ import { BadRequestException } from '../../src/exceptions/bad-request-exception.
|
|||
import { EntityAlreadyExistsException } from '../../src/exceptions/entity-already-exists-exception.js';
|
||||
import { getStudentRequestsHandler } from '../../src/controllers/students.js';
|
||||
import { getClassHandler } from '../../src/controllers/classes';
|
||||
import { getClass02 } from '../test_assets/classes/classes.testdata';
|
||||
|
||||
describe('Teacher controllers', () => {
|
||||
let req: Partial<Request>;
|
||||
|
@ -167,7 +168,7 @@ describe('Teacher controllers', () => {
|
|||
|
||||
it('Get join requests by class', async () => {
|
||||
req = {
|
||||
params: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
params: { classId: getClass02().classId },
|
||||
};
|
||||
|
||||
await getStudentJoinRequestHandler(req as Request, res as Response);
|
||||
|
@ -181,7 +182,7 @@ describe('Teacher controllers', () => {
|
|||
|
||||
it('Update join request status', async () => {
|
||||
req = {
|
||||
params: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89', studentUsername: 'PinkFloyd' },
|
||||
params: { classId: getClass02().classId, studentUsername: 'PinkFloyd' },
|
||||
body: { accepted: 'true' },
|
||||
};
|
||||
|
||||
|
@ -199,7 +200,7 @@ describe('Teacher controllers', () => {
|
|||
expect(status).toBeTruthy();
|
||||
|
||||
req = {
|
||||
params: { id: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
params: { id: getClass02().classId },
|
||||
};
|
||||
|
||||
await getClassHandler(req as Request, res as Response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue