Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJoseph Frazer <joseph.frazer@ryansg.com>2019-12-23 08:42:48 -0500
committerJoseph Frazer <joseph.frazer@ryansg.com>2019-12-23 08:42:48 -0500
commit8ae6e236e988f4e3b59d7c2d2af0293fdce0f02d (patch)
treebc2b12cd8220ff8cfceeb340ac86ccb96e0ea962 /test
parentb48a9f0de2e353adefb4f7968a250c0da5eff6c2 (diff)
parentaa2ba885aff127dc35d7c762be4262f2d6dad8c2 (diff)
downloadliza-8ae6e236e988f4e3b59d7c2d2af0293fdce0f02d.tar.gz
liza-8ae6e236e988f4e3b59d7c2d2af0293fdce0f02d.tar.bz2
liza-8ae6e236e988f4e3b59d7c2d2af0293fdce0f02d.zip
[DEV-6756] Prevent special chars from "local-part" of email address
Merge branch 'jira-6756' * jira-6756: [DEV-6756] Prevent special chars from "local-part" of email address
Diffstat (limited to 'test')
-rw-r--r--test/validate/formatter/EmailFormatterTest.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/validate/formatter/EmailFormatterTest.js b/test/validate/formatter/EmailFormatterTest.js
index c451f32..a1cbda4 100644
--- a/test/validate/formatter/EmailFormatterTest.js
+++ b/test/validate/formatter/EmailFormatterTest.js
@@ -34,7 +34,6 @@ describe( 'validate.formatter.StringFormat', function()
"firstname.lastname@domain.com",
"email@subdomain.domain.com",
"firstname+lastname@domain.com",
- 'email"@domain.com',
"1234567890@domain.com",
"email@domain-one.com",
"_______@domain.com",
@@ -50,7 +49,7 @@ describe( 'validate.formatter.StringFormat', function()
"@domain.com",
"Joe Smith <email@domain.com>",
"email.domain.com",
- // "email@domain@domain.com",
+ "email@domain@domain.com",
".email@domain.com",
"email.@domain.com",
"email..email@domain.com",
@@ -59,5 +58,17 @@ describe( 'validate.formatter.StringFormat', function()
"email@domain",
"email@-domain.com",
"email@domain..com",
+ "em,ail@domain.com",
+ 'em"ail@domain.com',
+ "em(ail@domain.com",
+ "em)ail@domain.com",
+ "em:ail@domain.com",
+ "em;ail@domain.com",
+ "em<ail@domain.com",
+ "em>ail@domain.com",
+ "em[ail@domain.com",
+ "em]ail@domain.com",
+ "em ail@domain.com",
+ "em\\ail@domain.com",
].forEach( email_address => assert.throws( () => Sut.parse( email_address ), Error ) );
} );