it('can delete a user' , function(done){ superagent.del('http://localhost:3000/users/' + id).end(function(e,res){ expect(e).to.eql(null); expect(res.body.msg).to.be.eql('success'); done(); }); })
function(model, cb) { request.del('localhost:2000/comments/'+ model._id).end(function(res) { CommentModel.count({}, function(err, cnt){ expect(cnt).to.be(0); cb(null, res); }); }); }
return (cb) => { Request.del(`${apiUrl}/categories/${data.id}/convert_products_to/${data.new_id}`) .send(data) .end((err, res) => { if (err) return cb(true); cb(null, res.body); }); };
it('should delete offer2', function (done) { request .del(offer2.offer_url) .end(function (err, res) { assert.equal(res.status, 200); done(); }); });
deleteActivity: function(activityId, callbackFunction) { request .del('/activities/' + activityId) .end(function(response) { _handleErrors(response); callbackFunction(activityId); }); },
handleRequest(url, options, function (url, options) { request.del(url) .set(options.headers) .query(options.query) .end(function (err, res) { handleResponse(err, res, callback); }); });
.end(function(err, res) { hlp.expectStatus(err, res, 201); request .del('/api/v1/games/' + res.body.id) .save({ path: 'games/delete'}) .as(user) .end(hlp.status(204, done)); });
}, function(){ superagent.del('http://localhost:7000/myPath') .query({query:"a-query"}) .end(function(_, res) { Simulado.lastRequest("DELETE", "/myPath").params.should.deep.equal({query:"a-query"}); done() }); });
return new Promise(function(resolve, reject) { Request.del(url) .set('Content-Type', 'application/json') .set('Accept', 'application/json') .end(function (err, res) { err ? reject(err) : resolve(res); }) });
getApiToken(token => { request .del(`${getApiPath()}/v2/comments/${id}`) .set('Authorization', `Bearer ${token}`) .end((err, res) => { err ? reject(err) : resolve(res.body.comment); }); }, true);
it('Deletes a task', function (done) { request.del('http://localhost:3001/todolist/tasks/'+id) .end(function (err, res) { expect(err).toEqual(null) expect(res.body.msg).toEqual('success') done() }) })
Relax.prototype.drop = function(name, cb) { var path = this.opts.server+'/'+name; var req = request.del(path); if (!cb) return req; req.end(function(err, res) { (res.ok) ? cb(null, res.ok) : cb(null, JSON.parse(res.text.trim()) ); }); };
Relax.prototype.logout = function(cb) { var path = this.opts.server + '/_session'; var req = request.del(path); if (!cb) return req; req.end(function(err, res) { (res.ok) ? cb(null, JSON.parse(res.text)) : cb(err, null); }); };
it('remove test user', function (done){ request.del('localhost:3000/users/deleteUserByUsername/testRohit1') .set('cookie', self.cookie) .end(function (response){ response.status.should.equal(200); done(); }); });
destroy: function(id) { request .del(API_BASE + '/todos/' + id) .end(function(err, res) { if (err) TodoServerActions.destroyFailure(err); TodoServerActions.destroySuccess(id); }); },
}, function(){ superagent.del('http://localhost:7000/myPath') .set('my-header', 'my-value') .end(function(_, res) { Simulado.lastRequest("DELETE", "/myPath").headers.should.include({'my-header':'my-value'}); done() }); });
destroyCompleted: function() { request .del(API_BASE + '/todos/complete') .end(function(err, res) { if (err) TodoServerActions.destroyCompletedFailure(err); TodoServerActions.destroyCompletedSuccess(); }); }
removePermission: function(permission, profile) { request.del('/api/users/' + profile.user.id + '/permissions') .send({permission: permission}) .end(function(err, res) { if (err) return; this.fetch(); }.bind(this)); },
it('can remove a user', function(done) { superagent.del('http://localhost:3000/users/' + id).end(function(e, res) { expect(res.status).toEqual(200) expect(typeof res.body).toEqual('number') expect(res.body).toBeGreaterThan(0); done(); }) });
it('should remove the specified guild', function(done) { superagent.del(baseUrl + '/guilds/' + existingGuild.id) .end((err, res) => { expect(err).not.to.exist; expect(res.body._id).to.eql(existingGuild.id); done(); }) });
it('can succesfully delete a note', function(done) { superagent.del('http://localhost:3000/api/v0_0_1/notes/' + id) .end(function(err, res) { expect(err).to.eql(null); done(); }); });
return (cb) => { Request.del(`${apiUrl}${path}`) .send(data) .end((err, res) => { if (err) return cb(true); cb(null, res.body); }); };
it('should be delete one photo by id', done => { request .del(url.resolve(ABS_URL, 'photos/'+id)) .end((err, res) => { res.status.should.be.eql(204) done(); }); });
it('Should be able to delete without any problems on calling DEL /api/notifications', function (done){ request.del('http://localhost:3000/api/notifications/'+testNotificationId) .set('cookie', self.cookie) .end(function (response){ response.status.should.equal(200); done(); }); });
module.exports.del = function (url, callback) { var name = 'DELETE ' + url debug('--> %s', name) return superagent .del(url) .use(prefix) .use(nocache) .end(response(name, callback)) }
deletePhoto: function(ev) { ev.preventDefault(); request.del('/api/clubs/' + this.state.slug + '/logo') .end(function(err, res) { if (err) return; this.fetch(this.state.slug); }.bind(this)); },
it('removes an object', function(done){ superagent.del('http://localhost:3000/collections/test/'+id) .end(function(e, res){ expect(e).to.eql(null) expect(typeof res.body).to.eql('object'); expect(res.body.msg).to.eql('success'); done() }) })
function teardown(config){ const cdb = config.couchdb.host+':'+config.couchdb.port + '/'+ config.couchdb.db return superagent.del(cdb) .type('json') .auth(config.couchdb.auth.username ,config.couchdb.auth.password) }
User.prototype.destroy = function (fn) { var db = this.database var req = request .del(utils.url(db.connection, 'db/' + db.name + '/users/' + this.name)) .query(utils.qs(db.connection)) return utils.maybeCall(fn, utils.req(req)) }
it('Delete it - DEL ' + dbid, function (done) { request .del('http://localhost:3000/app/services/:id') .end(function (res) { res.statusCode.should.equal(200); res.body.success.should.equal(true); done(); }); });