forked from PalisadoesFoundation/talawa-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0fba68
commit 7ffee91
Showing
5 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,15 @@ describe("hashingModule", () => { | |
}); | ||
}); | ||
|
||
it("should produce diffrent hashes with diffrent HASH_PEPPER values", () => { | ||
const email = "[email protected]" | ||
process.env.HASH_PEPPER = "pepper1"; | ||
const hash1 = hashEmail(email); | ||
process.env.HASH_PEPPER = "pepper2"; | ||
const hash2 = hashEmail(email); | ||
expect(hash1).not.toEqual(hash2); | ||
it("should produce different hashes with different HASH_PEPPER values", () => { | ||
const email = "[email protected]" | ||
const originalPepper = process.env.HASH_PEPPER; | ||
process.env.HASH_PEPPER = "pepper1"; | ||
const hash1 = hashEmail(email); | ||
process.env.HASH_PEPPER = "pepper2"; | ||
const hash2 = hashEmail(email); | ||
expect(hash1).not.toEqual(hash2); | ||
process.env.HASH_PEPPER = originalPepper; | ||
}) | ||
}) | ||
}) |