Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #701 from zanata/fix-invalidresetpassword-test
Browse files Browse the repository at this point in the history
Fix security functional test error
  • Loading branch information
djansen-redhat committed Feb 24, 2015
2 parents 79fbac5 + 79dff19 commit 848ec39
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -141,12 +141,13 @@ public void invalidResetPasswordFieldEntries() {
.contains("not a well-formed email address")
.as("Invalid email error is displayed");

String error = resetPasswordPage.getErrors().get(0);
// Both are valid, but show seemingly at random
assertThat(error.equals("size must be between 3 and 20") ||
error.equals("must match ^[a-z\\d_]{3,20}$"))
.isTrue()
.as("Invalid email error is displayed");
assertThat(resetPasswordPage.getErrors().get(0))
.isIn("Between 3 and 20 lowercase letters, numbers and " +
"underscores only",
"size must be between 3 and 20",
"must match ^[a-z\\d_]{3,20}$")
.as("Invalid username error is displayed");
}

@Feature(summary = "The user must enter both an account name and email " +
Expand Down

0 comments on commit 848ec39

Please sign in to comment.