diff --git a/test/validation.test.js b/test/collection.test.js similarity index 92% rename from test/validation.test.js rename to test/collection.test.js index 9b47df2..6bea759 100644 --- a/test/validation.test.js +++ b/test/collection.test.js @@ -1,4 +1,4 @@ -describe('Resource Actions', function(){ +describe('Collection Actions', function(){ describe('GET /todos', function(){ it('should return the todos', function(done) { todos.post({title: 'foo todo'}, function (err) { @@ -188,4 +188,19 @@ describe('Resource Actions', function(){ }) }) }) + + describe('DELETE /todos', function(){ + it('should drop the entire collection when using a root auth key', function(done) { + todos.post({title: 'foo'}, function(err) { + expect(err).to.not.exist; + // use root key + client.use('/todos').del(function (error) { + todos.get(function (err, todos) { + expect(todos).to.not.exist; + done(err); + }) + }) + }) + }) + }) }) \ No newline at end of file