1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

latest version

This commit is contained in:
Mateus Badan de Pieri 2023-04-11 10:22:47 +01:00
parent f1b7ff0f7c
commit de613d2b28

View file

@ -1,15 +1,10 @@
// mock the `getTenantId` and `isMultiTenant` functions
jest.mock("../../context", () => ({
getTenantId: jest.fn(() => "budibase"),
isMultiTenant: jest.fn(() => true),
}))
import { TenantResolutionStrategy } from "@budibase/types"
import { addTenantToUrl, isUserInAppTenant, getTenantIDFromCtx } from "../"
import {
isMultiTenant,
getTenantIDFromAppID,
DEFAULT_TENANT_ID,
getTenantId,
} from "../../context"
import { any } from "joi"
const mockedIsMultiTenant = isMultiTenant as jest.MockedFunction<
@ -18,6 +13,11 @@ const mockedIsMultiTenant = isMultiTenant as jest.MockedFunction<
const mockedGetTenantIDFromAppID = getTenantIDFromAppID as jest.MockedFunction<
typeof getTenantIDFromAppID
>
// mock the `getTenantId` and `isMultiTenant` functions
jest.mock("../../context", () => ({
getTenantId: jest.fn(() => "budibase"),
isMultiTenant: jest.fn(() => true),
}))
describe("addTenantToUrl", () => {
it("should append tenantId parameter to the URL", () => {
const url = "https://budibase.com"