diff --git a/lib/resources/user-collection.js b/lib/resources/user-collection.js index a72cbcc..9c6c3ea 100644 --- a/lib/resources/user-collection.js +++ b/lib/resources/user-collection.js @@ -118,7 +118,6 @@ UserCollection.prototype.handle = function (ctx) { ctx.done(err, res); } - console.log(ctx.query); if(ctx.query.id || ctx.body.id) { this.save(ctx, done); } else { diff --git a/test-app/public/test/user-collection.test.js b/test-app/public/test/user-collection.test.js index b709ba7..74bb9de 100644 --- a/test-app/public/test/user-collection.test.js +++ b/test-app/public/test/user-collection.test.js @@ -70,6 +70,13 @@ describe('User Collection', function() { }) }) }) + + it('should not crash the server when called without a body', function(done) { + dpd.users.login(null, function(session, err) { + expect(err).to.exist; + done(); + }); + }); }) describe('.me(fn)', function() { it('should return the current user', function(done) {