style: verander namen van variabelen zodat ze beginnen met een kleine letter
This commit is contained in:
parent
4aa2dfc7d3
commit
da8e27acfd
12 changed files with 125 additions and 125 deletions
|
@ -10,39 +10,39 @@ import { TeacherRepository } from '../../src/data/users/teacher-repository';
|
|||
import { ClassRepository } from '../../src/data/classes/class-repository';
|
||||
|
||||
describe('ClassRepository', () => {
|
||||
let TeacherInvitationRepository: TeacherInvitationRepository;
|
||||
let TeacherRepository: TeacherRepository;
|
||||
let ClassRepository: ClassRepository;
|
||||
let teacherInvitationRepository: TeacherInvitationRepository;
|
||||
let teacherRepository: TeacherRepository;
|
||||
let classRepository: ClassRepository;
|
||||
|
||||
beforeAll(async () => {
|
||||
await setupTestApp();
|
||||
TeacherInvitationRepository = getTeacherInvitationRepository();
|
||||
TeacherRepository = getTeacherRepository();
|
||||
ClassRepository = getClassRepository();
|
||||
teacherInvitationRepository = getTeacherInvitationRepository();
|
||||
teacherRepository = getTeacherRepository();
|
||||
classRepository = getClassRepository();
|
||||
});
|
||||
|
||||
it('should return all invitations from a teacher', async () => {
|
||||
const teacher = await TeacherRepository.findByUsername('LimpBizkit');
|
||||
const teacher = await teacherRepository.findByUsername('LimpBizkit');
|
||||
const invitations =
|
||||
await TeacherInvitationRepository.findAllInvitationsBy(teacher!);
|
||||
await teacherInvitationRepository.findAllInvitationsBy(teacher!);
|
||||
|
||||
expect(invitations).toBeTruthy();
|
||||
expect(invitations).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should return all invitations for a teacher', async () => {
|
||||
const teacher = await TeacherRepository.findByUsername('FooFighters');
|
||||
const teacher = await teacherRepository.findByUsername('FooFighters');
|
||||
const invitations =
|
||||
await TeacherInvitationRepository.findAllInvitationsFor(teacher!);
|
||||
await teacherInvitationRepository.findAllInvitationsFor(teacher!);
|
||||
|
||||
expect(invitations).toBeTruthy();
|
||||
expect(invitations).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should return all invitations for a class', async () => {
|
||||
const class_ = await ClassRepository.findById('id02');
|
||||
const class_ = await classRepository.findById('id02');
|
||||
const invitations =
|
||||
await TeacherInvitationRepository.findAllInvitationsForClass(
|
||||
await teacherInvitationRepository.findAllInvitationsForClass(
|
||||
class_!
|
||||
);
|
||||
|
||||
|
@ -51,13 +51,13 @@ describe('ClassRepository', () => {
|
|||
});
|
||||
|
||||
it('should not find a removed invitation', async () => {
|
||||
const class_ = await ClassRepository.findById('id01');
|
||||
const sender = await TeacherRepository.findByUsername('FooFighters');
|
||||
const receiver = await TeacherRepository.findByUsername('LimpBizkit');
|
||||
await TeacherInvitationRepository.deleteBy(class_!, sender!, receiver!);
|
||||
const class_ = await classRepository.findById('id01');
|
||||
const sender = await teacherRepository.findByUsername('FooFighters');
|
||||
const receiver = await teacherRepository.findByUsername('LimpBizkit');
|
||||
await teacherInvitationRepository.deleteBy(class_!, sender!, receiver!);
|
||||
|
||||
const invitation =
|
||||
await TeacherInvitationRepository.findAllInvitationsBy(sender!);
|
||||
await teacherInvitationRepository.findAllInvitationsBy(sender!);
|
||||
|
||||
expect(invitation).toHaveLength(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue