-
Notifications
You must be signed in to change notification settings - Fork 640
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
Showing
1 changed file
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,19 @@ class UserNormalisationTest extends PlaySpecification with Conversion { | |
|
||
"User migration" should { | ||
"convert simple name" in { | ||
normaliseLogin("myLogin") must beEqualTo("mylogin@thehive.local") | ||
normaliseLogin("myLogin") must beEqualTo("mylogin") | ||
} | ||
"convert simple name with dash" in { | ||
normaliseLogin("my-Login") must beEqualTo("my-login@thehive.local") | ||
normaliseLogin("my-Login") must beEqualTo("my-login") | ||
} | ||
"convert email address" in { | ||
normaliseLogin("[email protected]") must beEqualTo("[email protected]") | ||
} | ||
"convert login with special characters" in { | ||
normaliseLogin("login`with\"special^chars%") must beEqualTo("login.with.special.chars@thehive.local") | ||
normaliseLogin("login`with\"special^chars%") must beEqualTo("login.with.special.chars") | ||
} | ||
"convert login with only special characters" in { | ||
normaliseLogin("^'\"éç") must beEqualTo("empty.name@thehive.local") | ||
normaliseLogin("^'\"éç") must beEqualTo("empty.name") | ||
} | ||
"convert login with several @" in { | ||
normaliseLogin("first@second@third") must beEqualTo("[email protected]") | ||
|
@@ -32,10 +32,10 @@ class UserNormalisationTest extends PlaySpecification with Conversion { | |
normaliseLogin("[email protected].") must beEqualTo("first@domain") | ||
} | ||
"convert empty domain" in { | ||
normaliseLogin("first@") must beEqualTo("first@thehive.local") | ||
normaliseLogin("first@") must beEqualTo("first") | ||
} | ||
"convert email with invalid domain" in { | ||
normaliseLogin("first@```") must beEqualTo("first@thehive.local") | ||
normaliseLogin("first@```") must beEqualTo("first") | ||
} | ||
"convert email with dash" in { | ||
normaliseLogin("-first-name-@-domain-name-") must beEqualTo("first-name@domain-name") | ||
|