-
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 #385 from alphagov/ENG-516-add-ipa.gov.uk-email-do…
…main-to-raat Add ipa.gov.uk email domain to allowed list for RAAT
- Loading branch information
Showing
2 changed files
with
18 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 |
---|---|---|
|
@@ -16,6 +16,11 @@ class EmailValidatorTest < ActiveSupport::TestCase | |
assert EmailValidator.email_is_allowed_basic?(email) | ||
end | ||
|
||
test 'Infrastructure and Projects Authority email addresses are allowed to sign in' do | ||
email = '[email protected]' | ||
assert EmailValidator.email_is_allowed_basic?(email) | ||
end | ||
|
||
test 'Softwire email addresses are allowed to sign in' do | ||
email = '[email protected]' | ||
assert EmailValidator.email_is_allowed_basic?(email) | ||
|
@@ -56,6 +61,11 @@ class EmailValidatorTest < ActiveSupport::TestCase | |
assert EmailValidator.email_is_allowed_advanced?(email) | ||
end | ||
|
||
test 'Infrastructure and Projects Authority email addresses are allowed to manage users' do | ||
email = '[email protected]' | ||
assert EmailValidator.email_is_allowed_advanced?(email) | ||
end | ||
|
||
test 'Softwire email addresses are not allowed to manage users' do | ||
email = '[email protected]' | ||
assert ! EmailValidator.email_is_allowed_advanced?(email) | ||
|
@@ -91,6 +101,11 @@ class EmailValidatorTest < ActiveSupport::TestCase | |
assert_match EmailValidator.allowed_emails_regexp, email | ||
end | ||
|
||
test 'Infrastructure and Projects Authority emails can be used as usernames for new users' do | ||
email = '[email protected]' | ||
assert_match EmailValidator.allowed_emails_regexp, email | ||
end | ||
|
||
test 'Softwire emails are matched by the allowed emails regexp' do | ||
email = '[email protected]' | ||
assert_match EmailValidator.allowed_emails_regexp, email | ||
|