fix #1954 . Start updating API tests, beginning with challenges. Use

test to fix "challenge updates not updating users' tasks"
This commit is contained in:
Tyler Renelle
2014-01-03 00:00:27 -07:00
parent ae080fd474
commit 2c1eb955ac
4 changed files with 113 additions and 115 deletions
+1
View File
@@ -128,6 +128,7 @@ api.create = function(req, res){
waterfall = waterfall.concat([
function(cb) { // if we're dealing with prize above, arguemnts will be `group, numRows, cb` - else `cb`
req.body.leader = user._id;
var chal = new Challenge(req.body); // FIXME sanitize
chal.members.push(user._id);
chal.save(cb)