fix(backend): Merge-conflicten opgelost & testen gerepareerd.

This commit is contained in:
Gerald Schmittinger 2025-04-09 23:59:27 +02:00
parent d6dd7fb3bf
commit 620a988c6b
8 changed files with 23 additions and 9 deletions

View file

@ -32,7 +32,7 @@ describe('AssignmentRepository', () => {
});
it('should find all by username of the responsible teacher', async () => {
const result = await assignmentRepository.findAllByResponsibleTeacher('FooFighters');
const result = await assignmentRepository.findAllByResponsibleTeacher('testleerkracht1');
const resultIds = result.map((it) => it.id).sort((a, b) => (a ?? 0) - (b ?? 0));
expect(resultIds).toEqual([1, 3, 4]);

View file

@ -66,7 +66,7 @@ describe('SubmissionRepository', () => {
let assignment: Assignment | null;
let loId: LearningObjectIdentifier;
it('should find all submissions for a certain learning object and assignment', async () => {
clazz = await classRepository.findById('id01');
clazz = await classRepository.findById('8764b861-90a6-42e5-9732-c0d9eb2f55f9');
assignment = await assignmentRepository.findByClassAndId(clazz!, 1);
loId = {
hruid: 'id02',

View file

@ -37,7 +37,7 @@ describe('QuestionRepository', () => {
const id = new LearningObjectIdentifier('id03', Language.English, 1);
const student = await studentRepository.findByUsername('Noordkaap');
const clazz = await getClassRepository().findById('id01');
const clazz = await getClassRepository().findById('8764b861-90a6-42e5-9732-c0d9eb2f55f9');
const assignment = await getAssignmentRepository().findByClassAndId(clazz!, 1);
const group = await getGroupRepository().findByAssignmentAndGroupNumber(assignment!, 1);
await questionRepository.createQuestion({
@ -56,7 +56,7 @@ describe('QuestionRepository', () => {
let assignment: Assignment | null;
let loId: LearningObjectIdentifier;
it('should find all questions for a certain learning object and assignment', async () => {
clazz = await getClassRepository().findById('id01');
clazz = await getClassRepository().findById('8764b861-90a6-42e5-9732-c0d9eb2f55f9');
assignment = await getAssignmentRepository().findByClassAndId(clazz!, 1);
loId = {
hruid: 'id05',