8032-devToTest_2440 #3009
|
@ -1,4 +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 => {
|
||||||
|
|
|
@ -3,19 +3,19 @@ const {models} = require('vn-loopback/server/server');
|
||||||
describe('Account loginApp()', () => {
|
describe('Account loginApp()', () => {
|
||||||
const ctx = {req: {accessToken: {}}};
|
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(ctx, 'user', 'pass', 'androidid11234567890', 'warehouse', '10');
|
const req = models.Account.loginApp(ctx, 'user', 'pass', 'androidid11234567890', 'warehouse', '10');
|
||||||
|
|
||||||
await expectAsync(req).toBeRejected();
|
await expectAsync(req).toBeRejected();
|
||||||
});
|
});
|
||||||
|
|
||||||
fit('should return data from user', async() => {
|
fit('should return data from user', async() => {
|
||||||
let user = 'employee';
|
const user = 'employee';
|
||||||
let password = 'nightmare';
|
const password = 'nightmare';
|
||||||
let androidId = 'androidid11234567890';
|
const androidId = 'androidid11234567890';
|
||||||
let nameApp = 'warehouse';
|
const nameApp = 'warehouse';
|
||||||
let versionApp = '10';
|
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();
|
await expectAsync(req).toBeResolved();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue