Merge branch 'dev' into test/testen-voor-datalaag-#87
This commit is contained in:
commit
79393d6552
161 changed files with 9836 additions and 3751 deletions
|
@ -30,22 +30,18 @@ describe('StudentRepository', () => {
|
|||
});
|
||||
|
||||
it('should return the queried student after he was added', async () => {
|
||||
await studentRepository.insert(
|
||||
new Student(username, firstName, lastName)
|
||||
);
|
||||
await studentRepository.insert(new Student(username, firstName, lastName));
|
||||
|
||||
const retrievedStudent =
|
||||
await studentRepository.findByUsername(username);
|
||||
const retrievedStudent = await studentRepository.findByUsername(username);
|
||||
expect(retrievedStudent).toBeTruthy();
|
||||
expect(retrievedStudent?.firstName).toBe(firstName);
|
||||
expect(retrievedStudent?.lastName).toBe(lastName);
|
||||
});
|
||||
|
||||
it('should no longer return the queried student after he was removed again', async () => {
|
||||
await studentRepository.deleteByUsername('Nirvana');
|
||||
await studentRepository.deleteByUsername(username);
|
||||
|
||||
const retrievedStudent =
|
||||
await studentRepository.findByUsername('Nirvana');
|
||||
const retrievedStudent = await studentRepository.findByUsername(username);
|
||||
expect(retrievedStudent).toBeNull();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue