-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, if slc.co.uk were on the allowlist notslc.co.uk would also be permitted
- Loading branch information
1 parent
ed830c5
commit 73ccc6b
Showing
3 changed files
with
6 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,6 @@ describe("Verify email domains", () => { | |
it("Allow an email address ending with a domain on the allowed list", async () => { | ||
expect(await hasAllowedDomain(`[email protected].${allowedDomain}`)).toBe(true); | ||
}); | ||
|
||
it("Allow an email address ending with a subdomain on the allowed list", async () => { | ||
expect(await hasAllowedDomain(`[email protected]${allowedSubDomain}`)).toBe(true); | ||
}); | ||
}); | ||
|
||
describe("Reject invalid domains", () => { | ||
|
@@ -36,5 +32,9 @@ describe("Verify email domains", () => { | |
it("Reject an email address not ending with a subdomain on the allowed list", async () => { | ||
expect(await hasAllowedDomain(`[email protected].${allowedSubDomain}.subdomain`)).toBe(false); | ||
}); | ||
|
||
it("Rejects an email address where the allowed domain is a substring but not a subdomain", async () => { | ||
expect(await hasAllowedDomain(`[email protected]${allowedSubDomain}`)).toBe(false); | ||
}); | ||
}); | ||
}); |
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