mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-19 02:04:10 +00:00
Fixed tests and updated default challenge model name
This commit is contained in:
parent
c244fe488d
commit
d669db0f9a
3 changed files with 5 additions and 3 deletions
|
|
@ -117,7 +117,9 @@ describe('POST /challenges/:challengeId/leave', () => {
|
|||
});
|
||||
|
||||
expect(testTask).to.not.be.undefined;
|
||||
expect(testTask.challenge).to.eql({});
|
||||
expect(testTask.challenge).to.eql({
|
||||
name: 'None',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ describe('GET /groups/:groupId/members', () => {
|
|||
expect(Object.keys(memberRes.auth)).to.eql(['timestamps']);
|
||||
expect(Object.keys(memberRes.preferences).sort()).to.eql([
|
||||
'size', 'hair', 'skin', 'shirt',
|
||||
'chair', 'costume', 'sleep', 'background',
|
||||
'chair', 'costume', 'sleep', 'background', 'tasks',
|
||||
].sort());
|
||||
|
||||
expect(memberRes.stats.maxMP).to.exist;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export let TaskSchema = new Schema({
|
|||
userId: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set it belongs to a challenge
|
||||
|
||||
challenge: {
|
||||
name: {type: String, default: 'No Category'},
|
||||
name: {type: String, default: 'None'},
|
||||
id: {type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}, // When set (and userId not set) it's the original task
|
||||
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set but challenge.id defined it's the original task
|
||||
broken: {type: String, enum: ['CHALLENGE_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED', 'CHALLENGE_CLOSED', 'CHALLENGE_TASK_NOT_FOUND']}, // CHALLENGE_TASK_NOT_FOUND comes from v3 migration
|
||||
|
|
|
|||
Loading…
Reference in a new issue