22 lines
675 B
JavaScript
22 lines
675 B
JavaScript
'use strict';
|
|
|
|
const assert = require('node:assert/strict');
|
|
const {
|
|
getAuthToken,
|
|
invokeSystemMethod,
|
|
} = require('../../support/system_method_client');
|
|
|
|
describe('test/app/controller/system.user.info.test.js', () => {
|
|
it('should call user.info with bearer token', async () => {
|
|
const { token } = await getAuthToken();
|
|
const infoRes = await invokeSystemMethod('user.info', {}, token);
|
|
|
|
assert.equal(infoRes.status, 200);
|
|
assert.equal(infoRes.body.flag, 'success');
|
|
assert.equal(infoRes.body.code, 200);
|
|
assert.ok(infoRes.body.data);
|
|
assert.equal(infoRes.body.data.id, 1);
|
|
assert.equal(infoRes.body.data.platform_code, 'web');
|
|
});
|
|
});
|