test: alle testen slagen na aanpassen testdata
This commit is contained in:
parent
1ff6405066
commit
a5e82858ab
8 changed files with 23 additions and 23 deletions
|
@ -26,7 +26,7 @@ describe('ClassJoinRequestRepository', () => {
|
|||
});
|
||||
|
||||
it('should list all requests to a single class', async () => {
|
||||
const class_ = await cassRepository.findById('id02');
|
||||
const class_ = await cassRepository.findById('34d484a1-295f-4e9f-bfdc-3e7a23d86a89');
|
||||
const requests = await classJoinRequestRepository.findAllOpenRequestsTo(class_!);
|
||||
|
||||
expect(requests).toBeTruthy();
|
||||
|
@ -35,7 +35,7 @@ describe('ClassJoinRequestRepository', () => {
|
|||
|
||||
it('should not find a removed request', async () => {
|
||||
const student = await studentRepository.findByUsername('SmashingPumpkins');
|
||||
const class_ = await cassRepository.findById('id03');
|
||||
const class_ = await cassRepository.findById('80dcc3e0-1811-4091-9361-42c0eee91cfa');
|
||||
await classJoinRequestRepository.deleteBy(student!, class_!);
|
||||
|
||||
const request = await classJoinRequestRepository.findAllRequestsBy(student!);
|
||||
|
|
|
@ -18,16 +18,16 @@ describe('ClassRepository', () => {
|
|||
});
|
||||
|
||||
it('should return requested class', async () => {
|
||||
const classVar = await classRepository.findById('id01');
|
||||
const classVar = await classRepository.findById('8764b861-90a6-42e5-9732-c0d9eb2f55f9');
|
||||
|
||||
expect(classVar).toBeTruthy();
|
||||
expect(classVar?.displayName).toBe('class01');
|
||||
});
|
||||
|
||||
it('class should be gone after deletion', async () => {
|
||||
await classRepository.deleteById('id04');
|
||||
await classRepository.deleteById('33d03536-83b8-4880-9982-9bbf2f908ddf');
|
||||
|
||||
const classVar = await classRepository.findById('id04');
|
||||
const classVar = await classRepository.findById('33d03536-83b8-4880-9982-9bbf2f908ddf');
|
||||
|
||||
expect(classVar).toBeNull();
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@ describe('ClassRepository', () => {
|
|||
});
|
||||
|
||||
it('should return all invitations for a class', async () => {
|
||||
const class_ = await classRepository.findById('id02');
|
||||
const class_ = await classRepository.findById('34d484a1-295f-4e9f-bfdc-3e7a23d86a89');
|
||||
const invitations = await teacherInvitationRepository.findAllInvitationsForClass(class_!);
|
||||
|
||||
expect(invitations).toBeTruthy();
|
||||
|
@ -42,7 +42,7 @@ describe('ClassRepository', () => {
|
|||
});
|
||||
|
||||
it('should not find a removed invitation', async () => {
|
||||
const class_ = await classRepository.findById('id01');
|
||||
const class_ = await classRepository.findById('8764b861-90a6-42e5-9732-c0d9eb2f55f9');
|
||||
const sender = await teacherRepository.findByUsername('FooFighters');
|
||||
const receiver = await teacherRepository.findByUsername('LimpBizkit');
|
||||
await teacherInvitationRepository.deleteBy(class_!, sender!, receiver!);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue