test(backend): Testen voor DatabaseLearningPathProvider.fetchLearningPaths afgewerkt
Hierbij optredende problemen opgelost.
This commit is contained in:
parent
1f9e9ed70a
commit
7018a8822d
10 changed files with 139 additions and 32 deletions
|
@ -7,7 +7,10 @@ export class LearningPathRepository extends DwengoEntityRepository<LearningPath>
|
|||
hruid: string,
|
||||
language: Language
|
||||
): Promise<LearningPath | null> {
|
||||
return this.findOne({ hruid: hruid, language: language });
|
||||
return this.findOne(
|
||||
{ hruid: hruid, language: language },
|
||||
{ populate: ["nodes", "nodes.transitions"] }
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,8 +28,8 @@ export class LearningPathRepository extends DwengoEntityRepository<LearningPath>
|
|||
{ title: { $like: `%${query}%`} },
|
||||
{ description: { $like: `%${query}%`} }
|
||||
]
|
||||
}
|
||||
},
|
||||
populate: ["nodes", "nodes.transitions"]
|
||||
});
|
||||
}
|
||||
// This repository is read-only for now since creating own learning object is an extension feature.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue