6868_createLogin #2598

Merged
sergiodt merged 20 commits from 6868_createLogin into dev 2024-09-13 09:43:32 +00:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit c6da9e72e0 - Show all commits

View File

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

View File

@ -3,19 +3,19 @@ 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(ctx, 'user', 'pass', 'androidid11234567890', 'warehouse', '10');
const req = models.Account.loginApp(ctx, 'user', 'pass', 'androidid11234567890', 'warehouse', '10');
await expectAsync(req).toBeRejected();
});
fit('should return data from user', async() => {
let user = 'employee';
let password = 'nightmare';
let androidId = 'androidid11234567890';
let nameApp = 'warehouse';
let versionApp = '10';
const user = 'employee';
const password = 'nightmare';
const androidId = 'androidid11234567890';
const nameApp = 'warehouse';
const versionApp = '10';
let req = models.Account.loginApp(ctx, user, password, androidId, nameApp, versionApp);
const req = models.Account.loginApp(ctx, user, password, androidId, nameApp, versionApp);
await expectAsync(req).toBeResolved();
});
});