Skip to content

Commit

Permalink
do not overwrite create the temp user
Browse files Browse the repository at this point in the history
  • Loading branch information
XVincentX committed Apr 11, 2019
1 parent de96219 commit 26e4b54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/services/users.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ describe('User service tests', () => {
describe('Activate and deactivate user tests', () => {
let user;
before(() => db.flushdb().then(() => {
user = createRandomUserObject();
return userService.insert(user);
return userService.insert(createRandomUserObject());
}).then(newUser => {
user = newUser; // update test user
should.exist(newUser);
Expand Down Expand Up @@ -326,7 +325,7 @@ describe('User service tests', () => {
});
});

function createRandomUserObject () {
function createRandomUserObject() {
return {
username: uuid.v4(),
firstname: uuid.v4(),
Expand Down

0 comments on commit 26e4b54

Please sign in to comment.