added drop collection test

This commit is contained in:
Ritchie Martori
2012-04-05 10:04:26 -07:00
parent 96ee3a61c9
commit fc56866dcd

View File

@@ -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);
})
})
})
})
})
})