Fix password in clear text + extra#101
Merged
sanderhurlen merged 6 commits intodevelopfrom Feb 24, 2021
Merged
Conversation
freshfish70
approved these changes
Feb 20, 2021
Co-authored-by: Christoffer A Træen <christoffer.andersen@live.com>
perkynades
approved these changes
Feb 22, 2021
spiftire
approved these changes
Feb 22, 2021
Contributor
spiftire
left a comment
There was a problem hiding this comment.
Lgtm but made some suggestions
| const passwordPassedIn = '@passwordIsSecret1099' | ||
| const rand = Math.random() * 10 | ||
| beforeAll(async () => { | ||
| db = await getTestDatabase() |
Contributor
There was a problem hiding this comment.
we should probably use on file for this. I have added a file src/loaders/setupTestDB.ts that basically does the same thing. These files should be merged
Contributor
There was a problem hiding this comment.
maybe it can all be moved to the tests/Tests.utils.ts
| lastName: 'Last name org', | ||
| email: rand + 'testing@gmail.com', | ||
| password: passwordPassedIn | ||
| }) as Promise<ElectionOrganizer>) |
Comment on lines
+29
to
+33
| for (const organizer of organizers) { | ||
| const org = await service.delete(organizer.id) | ||
| } | ||
| await db.close() | ||
| }) |
Contributor
There was a problem hiding this comment.
Suggested change
| for (const organizer of organizers) { | |
| const org = await service.delete(organizer.id) | |
| } | |
| await db.close() | |
| }) | |
| await clearDatabaseTable() | |
| await db.close() | |
| }) | |
| async clearDatabaseTable() { | |
| service.remove(await service.find()) | |
| } |
Contributor
There was a problem hiding this comment.
remove() takes an array and removes all entities. and find() returns a list of all entities 🤯
I made a similar function on the feature/default-enums branch. It is generic and only needs the repo to work.
Closed
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #100, #96
This PR became a bit bigger than expected: