mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Fixed a couple tests.
This commit is contained in:
parent
f17e24013b
commit
ad2e01ee61
1 changed files with 3 additions and 8 deletions
|
@ -21,14 +21,8 @@ describe 'LevelComponent', ->
|
|||
expect(err).toBeNull()
|
||||
done()
|
||||
|
||||
it 'can\'t be created by ordinary users.', (done) ->
|
||||
it 'can be created by ordinary users.', (done) ->
|
||||
loginJoe ->
|
||||
request.post {uri: url, json: component}, (err, res, body) ->
|
||||
expect(res.statusCode).toBe(403)
|
||||
done()
|
||||
|
||||
it 'can be created by an admin.', (done) ->
|
||||
loginAdmin ->
|
||||
request.post {uri: url, json: component}, (err, res, body) ->
|
||||
expect(res.statusCode).toBe(200)
|
||||
expect(body._id).toBeDefined()
|
||||
|
@ -105,7 +99,8 @@ describe 'LevelComponent', ->
|
|||
components[0].official = true
|
||||
loginJoe ->
|
||||
request.post {uri: url, json: components[0]}, (err, res, body) ->
|
||||
expect(res.statusCode).toBe(403)
|
||||
expect(res.statusCode).toBe(200)
|
||||
expect(body.official).toBe(false)
|
||||
done()
|
||||
|
||||
it 'official property is editable by an admin.', (done) ->
|
||||
|
|
Loading…
Reference in a new issue