Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AuthenticationSpec() extends FlatSpec with ShouldMatchers {
- "Authentication" should "fail with the wrong credentials" in {
- val wrongPassword = Authentication.authenticate("MyUserName", "Wrong Password")
- val wrongUserName = Authentication.authenticate("Wrong User Name", "MyInsecurePassword")
- wrongUserName should not be 'Defined
- wrongPassword should not be 'Defined
- }
- "Authentication" should "Succeed with the wrong credentials" in {
- val login = Authentication.authenticate("MyUserName", "MyInsecurePassword")
- login should be ('Defined)
- }
- }
Add Comment
Please, Sign In to add comment