8032-devToTest_2440 #3009

Merged
alexm merged 262 commits from 8032-devToTest_2440 into test 2024-09-24 09:34:49 +00:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 0ab620b485 - Show all commits

View File

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

View File

@ -1,8 +1,9 @@
const {models} = require('vn-loopback/server/server'); const {models} = require('vn-loopback/server/server');
describe('Account loginApp()', () => { describe('Account loginApp()', () => {
const ctx = {req: {accessToken: {}}};
fit('should throw an error when user/password is wrong', async() => { 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(); await expectAsync(req).toBeRejected();
}); });
@ -14,7 +15,7 @@ describe('Account loginApp()', () => {
let nameApp = 'warehouse'; let nameApp = 'warehouse';
let versionApp = '10'; 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(); await expectAsync(req).toBeResolved();
}); });
}); });