-
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.
Merge pull request #268 from alphagov/pentestpartners
Allow pentest partners to have AWS user accounts
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 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 |
---|---|---|
|
@@ -26,6 +26,11 @@ class EmailValidatorTest < ActiveSupport::TestCase | |
assert EmailValidator.email_is_allowed_basic?(email) | ||
end | ||
|
||
test 'Pentestpartners email addresses are allowed to sign in' do | ||
email = '[email protected]' | ||
assert EmailValidator.email_is_allowed_basic?(email) | ||
end | ||
|
||
test 'Other email addresses are not allowed to sign in' do | ||
email = '[email protected]' | ||
assert ! EmailValidator.email_is_allowed_basic?(email) | ||
|
@@ -86,6 +91,11 @@ class EmailValidatorTest < ActiveSupport::TestCase | |
assert_match EmailValidator.allowed_emails_regexp, email | ||
end | ||
|
||
test 'Pentestpartners emails are matched by the allowed emails regexp' do | ||
email = '[email protected]' | ||
assert_match EmailValidator.allowed_emails_regexp, email | ||
end | ||
|
||
test 'Emails with numbers in the local part are allowed' do | ||
email = '[email protected]' | ||
assert_match EmailValidator.allowed_emails_regexp, email | ||
|