8032-devToTest_2440 #3009
|
@ -1,4 +1,4 @@
|
|||
const {ConsoleMessage} = require('puppeteer');
|
||||
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
module.exports = Self => {
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue