mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
Bugfix challenge tags to normal tags after a challenge has ended/deleted (#12341)
* Fix bug in challenge tags not converted to normal tags after challenge ended/deleted * Added test cases to test bug fix * Set tag.challenge from String to Boolean in tag model schema * Update existing test with tag challenge set to boolean instead of string * Added migration file for converting tag challenge field from string to bool * Implement suggestions from ilnt * Use mongoose instead of Mock in migration * Change from update to bulkwrite * update users individually Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
@@ -159,7 +159,7 @@ describe('POST /challenges/:challengeId/winner/:winnerId', () => {
|
||||
|
||||
expect(testTask.challenge.broken).to.eql('CHALLENGE_CLOSED');
|
||||
expect(testTask.challenge.winner).to.eql(winningUser.profile.name);
|
||||
expect(challengeTag.challenge).to.eql('false');
|
||||
expect(challengeTag.challenge).to.eql(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user