|
|
@@ -128,9 +128,6 @@ describe "AuthenticationManager", ->
|
|
|
@AuthenticationManager.setUserPassword(@user_id, @password, @callback)
|
|
|
|
|
|
it "should update the user's password in the database", ->
|
|
|
- # { _id: 58b411efedd652642a1bb10c },
|
|
|
- # { '$set': { hashedPassword: 'asdkjfa;osiuvandf' },
|
|
|
- # '$unset': { password: true } }
|
|
|
args = @db.users.update.lastCall.args
|
|
|
expect(args[0]).to.deep.equal {_id: ObjectId(@user_id.toString())}
|
|
|
expect(args[1]).to.deep.equal {
|
|
|
@@ -139,16 +136,6 @@ describe "AuthenticationManager", ->
|
|
|
}
|
|
|
$unset: password: true
|
|
|
}
|
|
|
- # @db.users.update
|
|
|
- # .calledWith({
|
|
|
- # _id: ObjectId(@user_id.toString())
|
|
|
- # }, {
|
|
|
- # $set: {
|
|
|
- # "hashedPassword": @hashedPassword
|
|
|
- # }
|
|
|
- # $unset: password: true
|
|
|
- # })
|
|
|
- # .should.equal true
|
|
|
|
|
|
it "should hash the password", ->
|
|
|
@bcrypt.genSalt
|