Merge branch 'master' of github.com:sharelatex/web-sharelatex

This commit is contained in:
James Allen 2014-08-07 16:53:07 +01:00
commit 2730a2e73c
2 changed files with 4 additions and 5 deletions

View file

@ -32,7 +32,7 @@ module.exports = AuthenticationController =
else else
AuthenticationController._recordFailedLogin() AuthenticationController._recordFailedLogin()
logger.log email: email, "failed log in" logger.log email: email, "failed log in"
res.send message: res.send 401, message:
text: req.i18n.translate("email_or_password_wrong_try_again"), text: req.i18n.translate("email_or_password_wrong_try_again"),
type: 'error' type: 'error'

View file

@ -96,11 +96,10 @@ describe "AuthenticationController", ->
@AuthenticationController.login(@req, @res) @AuthenticationController.login(@req, @res)
it "should return an error", -> it "should return an error", ->
# @res.body.should.exist
expect(@res.body.message).to.exist expect(@res.body.message).to.exist
# message:
# text: 'Your email or password were incorrect. Please try again', it "should set the res code to 401", ->
# type: 'error' @res.statusCode.should.equal 401
it "should not establish a session", -> it "should not establish a session", ->
@AuthenticationController._establishUserSession.called.should.equal false @AuthenticationController._establishUserSession.called.should.equal false