From 173c604a2c215aec750fa1f0ebcf29fdc800609a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 25 Nov 2024 18:42:59 -0500 Subject: [PATCH] test: fix tests --- src/user/create.js | 2 +- test/user.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/user/create.js b/src/user/create.js index 610d614e81..154285bee9 100644 --- a/src/user/create.js +++ b/src/user/create.js @@ -50,7 +50,7 @@ module.exports = function (User) { lastonline: timestamp, status: 'online', }; - ['picture', 'fullname', 'location', 'birthday'].forEach((field) => { + ['picture', 'fullname', 'birthday'].forEach((field) => { if (data[field]) { userData[field] = data[field]; } diff --git a/test/user.js b/test/user.js index 9b7fc88f18..84d8711260 100644 --- a/test/user.js +++ b/test/user.js @@ -737,8 +737,6 @@ describe('User', () => { username: 'updatedUserName', email: 'updatedEmail@me.com', fullname: 'updatedFullname', - website: 'http://nodebb.org', - location: 'izmir', groupTitle: 'testGroup', birthday: '01/01/1980', signature: 'nodebb is good', @@ -747,7 +745,7 @@ describe('User', () => { const result = await apiUser.update({ uid: uid }, { ...data, password: '123456', invalid: 'field' }); assert.equal(result.username, 'updatedUserName'); assert.equal(result.userslug, 'updatedusername'); - assert.equal(result.location, 'izmir'); + assert.equal(result.fullname, 'updatedFullname'); const userData = await db.getObject(`user:${uid}`); Object.keys(data).forEach((key) => {