From 01621470c0c3c34eb6550a8b56b35d04e2aa1907 Mon Sep 17 00:00:00 2001 From: Patrik Braun Date: Wed, 26 Jul 2017 19:43:06 +0200 Subject: [PATCH] bugfix --- package.json | 2 +- test/backend/unit/middlewares/user/AuthenticationMWs.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 43a723b3..21d7f1fe 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/backend/unit/middlewares/user/AuthenticationMWs.ts b/test/backend/unit/middlewares/user/AuthenticationMWs.ts index e245f4cc..6c19cd62 100644 --- a/test/backend/unit/middlewares/user/AuthenticationMWs.ts +++ b/test/backend/unit/middlewares/user/AuthenticationMWs.ts @@ -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 = { + ObjectManagerRepository.getInstance().UserManager = { findOne: (filter) => { - return Promise.resolve("test user"); + return Promise.resolve("test user"); } }; AuthenticationMWs.login(req, null, next);