@@ -31,36 +31,36 @@ class LocalPasswordAuthSrvTest extends PlaySpecification with TestAppBuilder {
3131 import com .softwaremill .macwire ._
3232
3333 val localPasswordAuthProvider = wire[LocalPasswordAuthProvider ]
34- implicit val authCtx = LocalUserSrv .getSystemAuthContext
34+ implicit val authCtx = LocalUserSrv .getSystemAuthContext
3535
3636 {
37- val policyConfig = Configuration (" passwordPolicy.enabled" -> true , " passwordPolicy.minLength" -> 12 )
37+ val policyConfig = Configuration (" passwordPolicy.enabled" -> true , " passwordPolicy.minLength" -> 12 )
3838 val localPasswordAuthSrv = localPasswordAuthProvider.apply(policyConfig withFallback configuration).get.asInstanceOf [LocalPasswordAuthSrv ]
3939
4040 val result = localPasswordAuthSrv.setPassword(" foo" , " foo" )
41- result must beFailedTry.withThrowable[BadRequestError ]
41+ result must beFailedTry.withThrowable[BadRequestError ]
4242 result.failed.get.getMessage must contain(" Password must be 12 or more characters in length" )
4343 }
4444
4545 {
46- val policyConfig = Configuration (" passwordPolicy.enabled" -> true , " passwordPolicy.minUpperCase" -> 1 )
46+ val policyConfig = Configuration (" passwordPolicy.enabled" -> true , " passwordPolicy.minUpperCase" -> 1 )
4747 val localPasswordAuthSrv = localPasswordAuthProvider.apply(policyConfig withFallback configuration).get.asInstanceOf [LocalPasswordAuthSrv ]
4848
4949 val result = localPasswordAuthSrv.setPassword(" foo" , " foo" )
50- result must beFailedTry.withThrowable[BadRequestError ]
50+ result must beFailedTry.withThrowable[BadRequestError ]
5151 result.failed.get.getMessage must contain(" Password must contain 1 or more uppercase characters" )
5252 }
5353
5454 {
5555 val policyConfig = Configuration (
56- " passwordPolicy.enabled" -> true ,
57- " passwordPolicy.minSpecial" -> 1 ,
56+ " passwordPolicy.enabled" -> true ,
57+ " passwordPolicy.minSpecial" -> 1 ,
5858 " passwordPolicy.cannotContainUsername" -> true
5959 )
6060 val localPasswordAuthSrv = localPasswordAuthProvider.apply(policyConfig withFallback configuration).get.asInstanceOf [LocalPasswordAuthSrv ]
6161
6262 val result = localPasswordAuthSrv.setPassword(" foo" , " foo123" )
63- result must beFailedTry.withThrowable[BadRequestError ]
63+ result must beFailedTry.withThrowable[BadRequestError ]
6464 result.failed.get.getMessage must contain(" Password must contain 1 or more special characters" )
6565 result.failed.get.getMessage must contain(" Password contains the user id 'foo'" )
6666 }
0 commit comments