fix(tests): correct string update errors

This commit is contained in:
SabreCat
2018-11-28 01:00:46 +00:00
parent b509c6631d
commit a30c4379a6
3 changed files with 9 additions and 5 deletions

View File

@@ -245,7 +245,9 @@ describe('Password Utilities', () => {
it('returns false if the user has no local auth', async () => { it('returns false if the user has no local auth', async () => {
let user = await generateUser({ let user = await generateUser({
auth: 'not an object with valid fields', auth: {
facebook: {},
},
}); });
let res = await validatePasswordResetCodeAndFindUser(encrypt(JSON.stringify({ let res = await validatePasswordResetCodeAndFindUser(encrypt(JSON.stringify({
userId: user._id, userId: user._id,

View File

@@ -18,7 +18,12 @@ describe('GET /user/anonymized', () => {
'profile.name': 'profile', 'profile.name': 'profile',
'purchased.plan': 'purchased plan', 'purchased.plan': 'purchased plan',
contributor: 'contributor', contributor: 'contributor',
invitations: 'invitations', invitations: {
guilds: ['guild1', 'guild2'],
party: {
_id: 'partyid',
},
},
'items.special.nyeReceived': 'some', 'items.special.nyeReceived': 'some',
'items.special.valentineReceived': 'some', 'items.special.valentineReceived': 'some',
webhooks: [{url: 'https://somurl.com'}], webhooks: [{url: 'https://somurl.com'}],

View File

@@ -94,9 +94,6 @@ describe('POST /user/auth/reset-password-set-new-one', () => {
userId: user._id, userId: user._id,
expiresAt: moment().add({days: 1}), expiresAt: moment().add({days: 1}),
})); }));
await user.update({
auth: 'not an object with valid fields',
});
await expect(api.post(`${endpoint}`, { await expect(api.post(`${endpoint}`, {
code, code,