From ea1ed667173dbb91e7dbaaf7d681fcffc18750d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 13 Jun 2022 18:45:27 -0400 Subject: [PATCH] test: add more asserts to failing test --- test/authentication.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/authentication.js b/test/authentication.js index 7e69e04b8f..82b445a04e 100644 --- a/test/authentication.js +++ b/test/authentication.js @@ -118,7 +118,8 @@ describe('authentication', () => { }, (err, response, body) => { assert.ifError(err); assert(body); - + assert(body.hasOwnProperty('uid') && body.uid > 0); + const newUid = body.uid; request({ url: `${nconf.get('url')}/api/self`, json: true, @@ -128,6 +129,7 @@ describe('authentication', () => { assert(body); assert.equal(body.username, 'admin'); assert.equal(body.email, 'admin@nodebb.org'); + assert.equal(body.uid, newUid); user.getSettings(body.uid, (err, settings) => { assert.ifError(err); assert.equal(settings.userLang, 'it');