mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix tests
This commit is contained in:
@@ -10,6 +10,7 @@ describe('GET /heroes/:heroId', () => {
|
|||||||
const heroFields = [
|
const heroFields = [
|
||||||
'_id', 'id', 'auth', 'balance', 'contributor', 'flags', 'items',
|
'_id', 'id', 'auth', 'balance', 'contributor', 'flags', 'items',
|
||||||
'lastCron', 'party', 'preferences', 'profile', 'purchased', 'secret', 'achievements',
|
'lastCron', 'party', 'preferences', 'profile', 'purchased', 'secret', 'achievements',
|
||||||
|
'stats',
|
||||||
];
|
];
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ describe('PUT /heroes/:heroId', () => {
|
|||||||
const heroFields = [
|
const heroFields = [
|
||||||
'_id', 'auth', 'balance', 'contributor', 'flags', 'items', 'lastCron',
|
'_id', 'auth', 'balance', 'contributor', 'flags', 'items', 'lastCron',
|
||||||
'party', 'preferences', 'profile', 'purchased', 'secret', 'permissions', 'achievements',
|
'party', 'preferences', 'profile', 'purchased', 'secret', 'permissions', 'achievements',
|
||||||
|
'stats',
|
||||||
];
|
];
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState({ user: 'user.data' }),
|
...mapState({ user: 'user.data' }),
|
||||||
statPointsIncorrect () {
|
statPointsIncorrect () {
|
||||||
console.log(this.hero.stats.points, this.hero.stats.str,
|
|
||||||
this.hero.stats.int, this.hero.stats.per,
|
this.hero.stats.int, this.hero.stats.per,
|
||||||
this.hero.stats.con, this.hero.stats.lvl);
|
this.hero.stats.con, this.hero.stats.lvl);
|
||||||
return (parseInt(this.hero.stats.points, 10)
|
return (parseInt(this.hero.stats.points, 10)
|
||||||
|
|||||||
@@ -368,7 +368,6 @@ schema.pre('save', true, async function preSaveUser (next, done) {
|
|||||||
const history = UserHistory();
|
const history = UserHistory();
|
||||||
history.userId = this._id;
|
history.userId = this._id;
|
||||||
await history.save();
|
await history.save();
|
||||||
console.log('Initialized user history');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user