Fixed server tests.

This commit is contained in:
Scott Erickson 2014-12-08 14:56:39 -08:00
parent 46f7bbaaf5
commit 876a663690
2 changed files with 1 additions and 5 deletions

View file

@ -21,10 +21,6 @@ AchievablePlugin = (schema, options) ->
# Check if an achievement has been earned
schema.post 'save', (doc) ->
# sometimes post appears to be called twice. Handle this...
# TODO: Refactor this system to make it request-specific,
# perhaps by having POST/PUT requests store the copy on the request object themselves.
return if doc.isInit('_id') and not (doc.id of before)
isNew = not doc.isInit('_id') or not (doc.id of before)
originalDocObj = before[doc.id] unless isNew

View file

@ -69,7 +69,7 @@ describe 'POST /db/user', ->
expect(user.get('password')).toBeUndefined()
expect(user?.get('passwordHash')).not.toBeUndefined()
if user?.get('passwordHash')?
expect(user.get('passwordHash')[..5]).toBe('948c7e')
expect(user.get('passwordHash')[..5]).toBe('31dc3d')
expect(user.get('permissions').length).toBe(0)
done()