feat newLogin refs #6868
This commit is contained in:
parent
9d5d62afaf
commit
0ab620b485
|
@ -1,3 +1,4 @@
|
|||
const {ConsoleMessage} = require('puppeteer');
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
module.exports = Self => {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const {models} = require('vn-loopback/server/server');
|
||||
|
||||
describe('Account loginApp()', () => {
|
||||
const ctx = {req: {accessToken: {}}};
|
||||
fit('should throw an error when user/password is wrong', async() => {
|
||||
let req = models.Account.loginApp('user', 'pass');
|
||||
let req = models.Account.loginApp(ctx, 'user', 'pass', 'androidid11234567890', 'warehouse', '10');
|
||||
|
||||
await expectAsync(req).toBeRejected();
|
||||
});
|
||||
|
@ -14,7 +15,7 @@ describe('Account loginApp()', () => {
|
|||
let nameApp = 'warehouse';
|
||||
let versionApp = '10';
|
||||
|
||||
let req = models.Account.loginApp(user, password, androidId, nameApp, versionApp);
|
||||
let req = models.Account.loginApp(ctx, user, password, androidId, nameApp, versionApp);
|
||||
await expectAsync(req).toBeResolved();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue