Added better tests to ensure tasks are synced
This commit is contained in:
@@ -97,6 +97,7 @@ schema.methods.syncToUser = async function syncChallengeToUser (user) {
|
||||
let [challengeTasks, userTasks] = await Q.all([
|
||||
// Find original challenge tasks
|
||||
Tasks.Task.find({
|
||||
userId: {$exists: false},
|
||||
'challenge.id': challenge._id,
|
||||
}).exec(),
|
||||
// Find user's tasks linked to this challenge
|
||||
|
||||
Reference in New Issue
Block a user