1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing tests

This commit is contained in:
Braun Patrik 2017-03-20 11:37:20 +01:00
parent 879deb63d0
commit 483af01c99
2 changed files with 6 additions and 3 deletions

View File

@ -28,14 +28,15 @@ module.exports = function(config) {
files: [ files: [
// System.js for module loading
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/systemjs/dist/system.src.js',
// Polyfills // Polyfills
'node_modules/core-js/client/shim.js', 'node_modules/core-js/client/shim.js',
'node_modules/reflect-metadata/Reflect.js', 'node_modules/reflect-metadata/Reflect.js',
// System.js for module loading
'node_modules/systemjs/dist/system.js',
// zone.js // zone.js
'node_modules/zone.js/dist/zone.js', 'node_modules/zone.js/dist/zone.js',
'node_modules/zone.js/dist/long-stack-trace-zone.js', 'node_modules/zone.js/dist/long-stack-trace-zone.js',

View File

@ -4,6 +4,7 @@ import {Error, ErrorCodes} from "../../../../../common/entities/Error";
import {UserRoles} from "../../../../../common/entities/UserDTO"; import {UserRoles} from "../../../../../common/entities/UserDTO";
import {ObjectManagerRepository} from "../../../../../backend/model/ObjectManagerRepository"; import {ObjectManagerRepository} from "../../../../../backend/model/ObjectManagerRepository";
import {UserManager} from "../../../../../backend/model/memory/UserManager"; import {UserManager} from "../../../../../backend/model/memory/UserManager";
import {Config} from "../../../../../backend/config/Config";
describe('Authentication middleware', () => { describe('Authentication middleware', () => {
@ -31,6 +32,7 @@ describe('Authentication middleware', () => {
let req:any = { let req:any = {
session: {} session: {}
}; };
Config.Client.authenticationRequired = true;
let res:any = {}; let res:any = {};
let next:any = (err:Error) => { let next:any = (err:Error) => {
expect(err).not.to.be.undefined; expect(err).not.to.be.undefined;