Skip to content

Commit

Permalink
#1374 Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 24, 2020
1 parent 574bc53 commit 3ed733c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand All @@ -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")
Expand Down

0 comments on commit 3ed733c

Please sign in to comment.