Skip to content

Commit

Permalink
Remove unnecessary tests and resolved todos.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreuzkam-cap committed Sep 27, 2023
1 parent e2e2eb3 commit 0f2bbe0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,28 +398,6 @@ describe('Account Controller (API)', () => {
await loggedInClient.get(`/${studentAccount.id}`).expect(200);
});
});
describe('When searching with a superhero user', () => {
const setup = async () => {
const school = schoolFactory.buildWithId();

const superheroRoles = roleFactory.build({ name: RoleName.SUPERHERO, permissions: [] });
const superheroUser = userFactory.buildWithId({ roles: [superheroRoles] });
const superheroAccount = mapUserToAccount(superheroUser);

em.persist([school, superheroRoles, superheroUser, superheroAccount]);
await em.flush();

const loggedInClient = await testApiClient.login(superheroAccount);

return { loggedInClient };
};

it('should reject if id has invalid format', async () => {
const { loggedInClient } = await setup();
// TODO soll nicht 404 sondern 400
await loggedInClient.get(`/qwerty`).send().expect(404);
});
});

describe('When searching with a not authorized user', () => {
const setup = async () => {
Expand Down Expand Up @@ -607,26 +585,6 @@ describe('Account Controller (API)', () => {
});
});

describe('When using a superhero user', () => {
const setup = async () => {
const school = schoolFactory.buildWithId();
const superheroRoles = roleFactory.build({ name: RoleName.SUPERHERO, permissions: [] });
const superheroUser = userFactory.buildWithId({ roles: [superheroRoles] });
const superheroAccount = mapUserToAccount(superheroUser);

em.persist([school, superheroRoles, superheroUser, superheroAccount]);
await em.flush();

const loggedInClient = await testApiClient.login(superheroAccount);

return { loggedInClient };
};
it('should reject invalid account id format', async () => {
const { loggedInClient } = await setup();
// TODO soll nicht 404 sondern 400
await loggedInClient.delete('/qwerty').expect(404);
});
});
describe('When using a not authorized (admin) user', () => {
const setup = async () => {
const school = schoolFactory.buildWithId();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
// TODO: check if this has happened
// TODO: Compare with client
export const passwordPattern = /^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z])(?=.*[-_!<>§$%&/()=?\\;:,.#+*~'])\S.{6,253}\S$/;
1 change: 0 additions & 1 deletion apps/server/src/modules/account/review-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- write an md file or flow diagram describing how things work
- in what layer do the services belong?

- look at ALL spec files, adjust to test structure
- naming of DO vs Entity (DO is the leading, "Account", entity is just the datalayer representation "AccountEntity")

- new decisions for loggables
Expand Down

0 comments on commit 0f2bbe0

Please sign in to comment.