feat newLogin refs #6868

This commit is contained in:
Sergio De la torre 2024-06-17 16:50:00 +02:00
parent 9d5d62afaf
commit 0ab620b485
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
const {ConsoleMessage} = require('puppeteer');
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {

View File

@ -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();
});
});