Merge remote-tracking branch 'origin/dev' into fix/class-join-request
# Conflicts: # backend/src/controllers/classes.ts # backend/src/data/questions/question-repository.ts # backend/tests/controllers/students.test.ts # backend/tests/controllers/teachers.test.ts
This commit is contained in:
commit
0a0857deb9
58 changed files with 2058 additions and 277 deletions
|
@ -186,7 +186,7 @@ describe('Student controllers', () => {
|
|||
|
||||
it('Get join request by student and class', async () => {
|
||||
req = {
|
||||
params: { username: 'PinkFloyd', classId: 'id02' },
|
||||
params: { username: 'PinkFloyd', classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
};
|
||||
|
||||
await getStudentRequestHandler(req as Request, res as Response);
|
||||
|
@ -201,7 +201,7 @@ describe('Student controllers', () => {
|
|||
it('Create and delete join request', async () => {
|
||||
req = {
|
||||
params: { username: 'TheDoors' },
|
||||
body: { classId: 'id02' },
|
||||
body: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
};
|
||||
|
||||
await createStudentRequestHandler(req as Request, res as Response);
|
||||
|
@ -209,7 +209,7 @@ describe('Student controllers', () => {
|
|||
expect(jsonMock).toHaveBeenCalledWith(expect.objectContaining({ request: expect.anything() }));
|
||||
|
||||
req = {
|
||||
params: { username: 'TheDoors', classId: 'id02' },
|
||||
params: { username: 'TheDoors', classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
};
|
||||
|
||||
await deleteClassJoinRequestHandler(req as Request, res as Response);
|
||||
|
@ -231,7 +231,7 @@ describe('Student controllers', () => {
|
|||
it('Create join request duplicate', async () => {
|
||||
req = {
|
||||
params: { username: 'Tool' },
|
||||
body: { classId: 'id02' },
|
||||
body: { classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89' },
|
||||
};
|
||||
|
||||
await expect(async () => createStudentRequestHandler(req as Request, res as Response)).rejects.toThrow(ConflictException);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue