From eede484d29b3fac793231834a95c171f54ec673d Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Tue, 3 May 2016 14:40:14 +0200 Subject: [PATCH] bug fixing mongo init script --- test/backend/initMongo.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/backend/initMongo.ts b/test/backend/initMongo.ts index a737c823..edd5a99c 100644 --- a/test/backend/initMongo.ts +++ b/test/backend/initMongo.ts @@ -8,12 +8,27 @@ DatabaseManager.getInstance((err)=>{ process.exit() },()=>{ let userManager = new MongoUserManager(); - userManager.createUser(new User(0,"demo","demo@demo.hu","demo",UserRoles.Developer),(err)=>{ + userManager.createUser(new User(0,"demo","demo",UserRoles.Developer),(err)=>{ DatabaseManager.getInstance().disconnect(); process.exit() }); - userManager.createUser(new User(0,"admin","admin@admin.hu","admin",UserRoles.Developer),(err)=>{ + userManager.createUser(new User(1,"developer","developer",UserRoles.Developer),(err)=>{ + DatabaseManager.getInstance().disconnect(); + process.exit() + }); + + userManager.createUser(new User(1,"admin","admin",UserRoles.Admin),(err)=>{ + DatabaseManager.getInstance().disconnect(); + process.exit() + }); + + userManager.createUser(new User(1,"user","user",UserRoles.User),(err)=>{ + DatabaseManager.getInstance().disconnect(); + process.exit() + }); + + userManager.createUser(new User(1,"guest","guest",UserRoles.Guest),(err)=>{ DatabaseManager.getInstance().disconnect(); process.exit() });