mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-29 02:39:55 +01:00
test: add more asserts to failing test
This commit is contained in:
@@ -118,7 +118,8 @@ describe('authentication', () => {
|
|||||||
}, (err, response, body) => {
|
}, (err, response, body) => {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
assert(body);
|
assert(body);
|
||||||
|
assert(body.hasOwnProperty('uid') && body.uid > 0);
|
||||||
|
const newUid = body.uid;
|
||||||
request({
|
request({
|
||||||
url: `${nconf.get('url')}/api/self`,
|
url: `${nconf.get('url')}/api/self`,
|
||||||
json: true,
|
json: true,
|
||||||
@@ -128,6 +129,7 @@ describe('authentication', () => {
|
|||||||
assert(body);
|
assert(body);
|
||||||
assert.equal(body.username, 'admin');
|
assert.equal(body.username, 'admin');
|
||||||
assert.equal(body.email, 'admin@nodebb.org');
|
assert.equal(body.email, 'admin@nodebb.org');
|
||||||
|
assert.equal(body.uid, newUid);
|
||||||
user.getSettings(body.uid, (err, settings) => {
|
user.getSettings(body.uid, (err, settings) => {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
assert.equal(settings.userLang, 'it');
|
assert.equal(settings.userLang, 'it');
|
||||||
|
|||||||
Reference in New Issue
Block a user