Guest User

Untitled

a guest
Jun 2nd, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class AuthenticationSpec() extends FlatSpec with ShouldMatchers {
  2. "Authentication" should "fail with the wrong credentials" in {
  3. val wrongPassword = Authentication.authenticate("MyUserName", "Wrong Password")
  4. val wrongUserName = Authentication.authenticate("Wrong User Name", "MyInsecurePassword")
  5. wrongUserName should not be 'Defined
  6. wrongPassword should not be 'Defined
  7. }
  8. "Authentication" should "Succeed with the wrong credentials" in {
  9. val login = Authentication.authenticate("MyUserName", "MyInsecurePassword")
  10. login should be ('Defined)
  11. }
  12. }
Add Comment
Please, Sign In to add comment