Last active
December 10, 2015 21:38
-
-
Save mkonicek/4496644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthenticationServiceSpec extends WordSpec with MustMatchers { | |
"authenticate" in { | |
val authService = new AuthenticationService(new Mongo()) | |
val user = User("Jack", "[email protected]") | |
authService.signup(user, password = "24") must be (Success(user)) | |
authService.login(user.email, "24") must be (Success(user)) | |
authService.login(user.email, "25") must be (Failure("Invalid username or password.")) | |
authService.login("[email protected]", "24") must be (Failure("Invalid username or password.")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment