test: add CALL util.debugAdd
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
31a75956c0
commit
bfb6689835
|
@ -61,4 +61,21 @@ describe('Renew Token', () => {
|
|||
expect(error).toBeUndefined();
|
||||
expect(response.id).toEqual(ctx.req.accessToken.id);
|
||||
});
|
||||
|
||||
it('throw error', async() => {
|
||||
let error;
|
||||
|
||||
try {
|
||||
await models.VnUser.renewToken({req: {token: null}});
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
expect(error).toBeDefined();
|
||||
const query = 'SELECT * FROM util.debug';
|
||||
|
||||
const debugLog = await models.Application.rawSql(query, null);
|
||||
|
||||
expect(debugLog.length).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue