Rename name for id
This commit is contained in:
parent
7605bb46f6
commit
c747cabe73
|
@ -14,7 +14,7 @@ describe("utils", () => {
|
|||
})
|
||||
|
||||
it("should call platform logout", async () => {
|
||||
await doInTenant(structures.tenant.name(), async () => {
|
||||
await doInTenant(structures.tenant.id(), async () => {
|
||||
const ctx = structures.koa.newContext()
|
||||
await utils.platformLogout({ ctx, userId: "test" })
|
||||
expect(events.auth.logout).toBeCalledTimes(1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { newid } from "../../../src/newid"
|
||||
|
||||
export function name() {
|
||||
export function id() {
|
||||
return `tenant-${newid()}`
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ class TestConfiguration {
|
|||
async init(appName = newid()) {
|
||||
this.defaultUserValues = this.populateDefaultUserValues()
|
||||
if (context.isMultiTenant()) {
|
||||
this.tenantId = structures.tenant.name()
|
||||
this.tenantId = structures.tenant.id()
|
||||
}
|
||||
|
||||
if (!this.started) {
|
||||
|
|
|
@ -135,7 +135,7 @@ class TestConfiguration {
|
|||
|
||||
async beforeAll() {
|
||||
try {
|
||||
this.#tenantId = structures.tenant.name()
|
||||
this.#tenantId = structures.tenant.id()
|
||||
|
||||
// Running tests in parallel causes issues creating the globaldb twice. This ensures the db is properly created before starting
|
||||
await retry(async () => await this.createDefaultUser())
|
||||
|
|
|
@ -100,7 +100,7 @@ export class UserAPI extends TestAPI {
|
|||
request = {
|
||||
email: structures.email(),
|
||||
password: generator.string(),
|
||||
tenantId: structures.tenant.name(),
|
||||
tenantId: structures.tenant.id(),
|
||||
}
|
||||
}
|
||||
const res = await this.request
|
||||
|
|
Loading…
Reference in New Issue