refactor(core): Remove roleId indirection (no-changelog) (#8413)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-01-24 13:38:57 +01:00
committed by GitHub
parent 1affebd85e
commit d6deceacde
139 changed files with 922 additions and 1684 deletions

View File

@@ -1,8 +1,6 @@
import type { SuperAgentTest } from 'supertest';
import * as utils from './shared/utils/';
import type { Role } from '@db/entities/Role';
import type { User } from '@db/entities/User';
import { getGlobalOwnerRole } from './shared/db/roles';
import { createUser } from './shared/db/users';
/**
@@ -11,7 +9,6 @@ import { createUser } from './shared/db/users';
* The tests in this file are only checking endpoint permissions.
*/
let globalOwnerRole: Role;
let owner: User;
let authOwnerAgent: SuperAgentTest;
@@ -21,8 +18,7 @@ const testServer = utils.setupTestServer({
});
beforeAll(async () => {
globalOwnerRole = await getGlobalOwnerRole();
owner = await createUser({ globalRole: globalOwnerRole });
owner = await createUser({ role: 'global:owner' });
authOwnerAgent = testServer.authAgentFor(owner);
});