From ad2e01ee61a9c390fe4c8c9ff97962a2fb712ccd Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Thu, 10 Jul 2014 14:31:25 -0700 Subject: [PATCH] Fixed a couple tests. --- test/server/functional/level_component.spec.coffee | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/server/functional/level_component.spec.coffee b/test/server/functional/level_component.spec.coffee index d34ec82cb..697c14df7 100644 --- a/test/server/functional/level_component.spec.coffee +++ b/test/server/functional/level_component.spec.coffee @@ -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) ->