mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
fixing tests
This commit is contained in:
parent
879deb63d0
commit
483af01c99
@ -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',
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user