feat(backend): Functionaliteit toegevoegd om alle submissions zichtbaar voor een bepaalde leerling of leerkracht op te vragen.

This commit is contained in:
Gerald Schmittinger 2025-04-07 19:23:46 +02:00
parent 03fa7c7b14
commit 9135b9c5b0
9 changed files with 338 additions and 156 deletions

View file

@ -31,6 +31,13 @@ describe('AssignmentRepository', () => {
expect(assignments[0].title).toBe('tool');
});
it('should find all by username of the responsible teacher', async () => {
const result = await assignmentRepository.findAllByResponsibleTeacher("FooFighters")
const resultIds = result.map(it => it.id).sort();
expect(resultIds).toEqual([1, 3, 4]);
});
it('should not find removed assignment', async () => {
const class_ = await classRepository.findById('id01');
await assignmentRepository.deleteByClassAndId(class_!, 3);