mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
fix(tests): correct string update errors
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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'}],
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user