New default background (#8597)

* feat(bgs): new default background

* feat(bgs): backfill migration

* fix(migration): extraneous imports, bad paths

* fix(bgs): address comments

* fix(test): assert equality
This commit is contained in:
Sabe Jones
2017-03-28 16:49:24 -05:00
committed by GitHub
parent 1d7b733759
commit 03088f1d9f
8 changed files with 47 additions and 15 deletions

View File

@@ -71,6 +71,23 @@ describe('POST /user/auth/local/register', () => {
await expect(getProperty('users', user._id, '_ABtests')).to.eventually.be.a('object');
});
it('includes items awarded by default when creating a new user', async () => {
let username = generateRandomUserName();
let email = `${username}@example.com`;
let password = 'password';
let user = await api.post('/user/auth/local/register', {
username,
email,
password,
confirmPassword: password,
});
expect(user.items.quests.dustbunnies).to.equal(1);
expect(user.purchased.background.violet).to.be.ok;
expect(user.preferences.background).to.equal('violet');
});
it('requires password and confirmPassword to match', async () => {
let username = generateRandomUserName();
let email = `${username}@example.com`;