mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-31 19:12:22 +08:00
added drop collection test
This commit is contained in:
@@ -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);
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user