mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fixed server tests.
This commit is contained in:
parent
46f7bbaaf5
commit
876a663690
2 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue