Adjust newUser spec helper

This commit is contained in:
Blade Barringer
2015-08-14 23:55:36 -05:00
parent 426acf44c8
commit 53133c6439

View File

@@ -13,12 +13,10 @@ var specHelper = {};
specHelper.newReward = newReward; specHelper.newReward = newReward;
specHelper.newChallenge = newChallenge; specHelper.newChallenge = newChallenge;
function newUser() { function newUser(overrides) {
var buffs = { per:0, int:0, con:0, str:0, stealth: 0, streaks: false }; var buffs = { per:0, int:0, con:0, str:0, stealth: 0, streaks: false };
user = { var stats = { str:1, con:1, per:1, int:1, mp: 32, class: 'warrior', buffs: buffs, gp: 0 };
auth:{timestamps: {}}, var items = {
stats: {str:1, con:1, per:1, int:1, mp: 32, class: 'warrior', buffs: buffs, gp: 0},
items:{
lastDrop: { count: 0 }, lastDrop: { count: 0 },
hatchingPotions: {}, hatchingPotions: {},
eggs: {}, eggs: {},
@@ -26,7 +24,13 @@ var specHelper = {};
pets: {}, pets: {},
mounts: {}, mounts: {},
gear: { equipped: {}, costume: {}, owned: {} } gear: { equipped: {}, costume: {}, owned: {} }
}, };
user = {
_id: 'unique-user-id',
auth: { timestamps: {} },
stats: stats,
items: items,
party: { party: {
quest: { quest: {
progress: {down: 0} progress: {down: 0}
@@ -41,6 +45,9 @@ var specHelper = {};
filters: {}, filters: {},
achievements: {} achievements: {}
}; };
_setOverrides(user, overrides);
return user; return user;
} }