diff --git a/repo/rest-api/tests/mocha/helpers/testUsers.js b/repo/rest-api/tests/mocha/helpers/testUsers.js index 03fe665a06f..b339fe50ba5 100644 --- a/repo/rest-api/tests/mocha/helpers/testUsers.js +++ b/repo/rest-api/tests/mocha/helpers/testUsers.js @@ -28,9 +28,10 @@ async function createUser( purpose, groups ) { } ) ); - await root.login( name, password ); // root is now the new user + const user = action.getAnon(); + await user.login( name, password ); - return root; + return user; } async function getOrCreateBotUser() {