fix: invitation geeft enkel classId field terug
This commit is contained in:
parent
5624f3bbfe
commit
834e991568
4 changed files with 11 additions and 7 deletions
|
@ -13,6 +13,7 @@ import { makeTestAttachments } from './test_assets/content/attachments.testdata.
|
|||
import { makeTestQuestions } from './test_assets/questions/questions.testdata.js';
|
||||
import { makeTestAnswers } from './test_assets/questions/answers.testdata.js';
|
||||
import { makeTestSubmissions } from './test_assets/assignments/submission.testdata.js';
|
||||
import {Collection} from "@mikro-orm/core";
|
||||
|
||||
export async function setupTestApp(): Promise<void> {
|
||||
dotenv.config({ path: '.env.test' });
|
||||
|
@ -28,8 +29,8 @@ export async function setupTestApp(): Promise<void> {
|
|||
const assignments = makeTestAssignemnts(em, classes);
|
||||
const groups = makeTestGroups(em, students, assignments);
|
||||
|
||||
assignments[0].groups = groups.slice(0, 3);
|
||||
assignments[1].groups = groups.slice(3, 4);
|
||||
assignments[0].groups = new Collection(groups.slice(0, 3));
|
||||
assignments[1].groups = new Collection(groups.slice(3, 4));
|
||||
|
||||
const teacherInvitations = makeTestTeacherInvitations(em, teachers, classes);
|
||||
const classJoinRequests = makeTestClassJoinRequests(em, students, classes);
|
||||
|
@ -41,6 +42,9 @@ export async function setupTestApp(): Promise<void> {
|
|||
const answers = makeTestAnswers(em, teachers, questions);
|
||||
const submissions = makeTestSubmissions(em, students, groups);
|
||||
|
||||
console.log("classes", classes);
|
||||
console.log("invitations", teacherInvitations);
|
||||
|
||||
await em.persistAndFlush([
|
||||
...students,
|
||||
...teachers,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue