From 80778cbd7c05455caf88fc4472dde20527f13eae Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Tue, 13 Jan 2015 21:16:05 -0600 Subject: [PATCH] Added additional deletion test --- test/api.mocha.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/api.mocha.coffee b/test/api.mocha.coffee index 1964ba009f..d2abe41002 100644 --- a/test/api.mocha.coffee +++ b/test/api.mocha.coffee @@ -238,6 +238,19 @@ describe "API", -> expect(body.err).to.be "Task not found." done() + it "Does not update text, attribute, priority, value, notes if task is already deleted", (done) -> + request.put(baseURL + "/user/tasks/" + todo.id).send( + text: "New Title" + attribute: "str" + priority: 1 + value: 4 + notes: "Other notes" + ).end (res) -> + expectCode res, 404 + body = res.body + expect(body.err).to.be "Task not found." + done() + ###* GROUPS ###