mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
Updates to user cli + e2e + tests
- Updates to before + beforeEach for mongooose - Removed reference to dotenv from cli in e2e, should use NODE_ENV=test instead. - Changed test port from 30?? to 3000 to be consistent with what nightwatch was expecting
This commit is contained in:
+10
-6
@@ -80,12 +80,16 @@ function createUser(options) {
|
||||
.then((user) => {
|
||||
console.log(`Created user ${user.id}.`);
|
||||
|
||||
return User
|
||||
.addRoleToUser(user.id, result.role.trim())
|
||||
.then(() => {
|
||||
console.log(`Added the admin ${result.role.trim()} to User ${user.id}.`);
|
||||
util.shutdown();
|
||||
});
|
||||
if (result.role && result.role.length > 0) {
|
||||
return User
|
||||
.addRoleToUser(user.id, result.role.trim())
|
||||
.then(() => {
|
||||
console.log(`Added the admin ${result.role.trim()} to User ${user.id}.`);
|
||||
util.shutdown();
|
||||
});
|
||||
} else {
|
||||
util.shutdown();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user