mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
bugfix
This commit is contained in:
parent
e998b5fedb
commit
01621470c0
@ -9,7 +9,7 @@
|
||||
"bin": "./backend/index.js",
|
||||
"scripts": {
|
||||
"install": "tsc && ng build -prod",
|
||||
"build-release": "gulp",
|
||||
"build-release": "gulp build-release",
|
||||
"pretest": "tsc",
|
||||
"test": "ng test --single-run && mocha --recursive test/backend/unit",
|
||||
"start": "node ./backend/index",
|
||||
|
@ -5,6 +5,7 @@ import {UserDTO, UserRoles} from "../../../../../common/entities/UserDTO";
|
||||
import {ObjectManagerRepository} from "../../../../../backend/model/ObjectManagerRepository";
|
||||
import {UserManager} from "../../../../../backend/model/memory/UserManager";
|
||||
import {Config} from "../../../../../common/config/private/Config";
|
||||
import {IUserManager} from "../../../../../backend/model/interfaces/IUserManager";
|
||||
|
||||
|
||||
describe('Authentication middleware', () => {
|
||||
@ -219,9 +220,9 @@ describe('Authentication middleware', () => {
|
||||
expect(req.session.user).to.be.eql("test user");
|
||||
done();
|
||||
};
|
||||
ObjectManagerRepository.getInstance().UserManager = <UserManager>{
|
||||
ObjectManagerRepository.getInstance().UserManager = <IUserManager>{
|
||||
findOne: (filter) => {
|
||||
return Promise.resolve("test user");
|
||||
return Promise.resolve(<any>"test user");
|
||||
}
|
||||
};
|
||||
AuthenticationMWs.login(req, null, next);
|
||||
|
Loading…
Reference in New Issue
Block a user