pyc-website

main website for pyc inc.

git clone https://9o.is/git/pyc-website.git

UserSnipSpec.scala

(489B)


      1 package inc.pyc
      2 package snippet
      3 
      4 class UserSnipSpec extends BaseWordSpec {
      5 
      6   "Password" should {
      7     "have minimum requirements" in {
      8       
      9       val pattern: String = new PasswordChange().passwordPattern
     10       
     11       val valid = List("helloworld1", "hel?lo$(world", "&Helloworld")
     12       
     13       val invalid = List("helloworld","hello1W", "hello world2")
     14       
     15       valid.map(_.matches(pattern) should equal (true))
     16       invalid.map(_.matches(pattern) should equal (false))
     17     }
     18   }
     19 }