1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

changing url

This commit is contained in:
Mateus Badan de Pieri 2023-03-30 13:42:04 +01:00
parent 0c10803cd9
commit 02f33b59bb

View file

@ -25,14 +25,14 @@ jest.mock("../../src/context", () => ({
describe("addTenantToUrl", () => {
it("should append tenantId parameter to the URL", () => {
const url = "https://example.com"
const expectedUrl = "https://example.com?tenantId=budibase"
const url = "https://budibase.com"
const expectedUrl = "https://budibase.com?tenantId=budibase"
expect(addTenantToUrl(url)).toEqual(expectedUrl)
})
it("should append tenantId parameter to the URL query string", () => {
const url = "https://example.com?foo=bar"
const expectedUrl = "https://example.com?foo=bar&tenantId=default"
const url = "https://budibase.com?var=test"
const expectedUrl = "https://budibase.com?var=test&tenantId=default"
expect(addTenantToUrl(url)).toEqual(expectedUrl)
})
@ -43,8 +43,8 @@ describe("addTenantToUrl", () => {
isMultiTenant: jest.fn(() => false),
}))
const url = "https://example.com"
const expectedUrl = "https://example.com"
const url = "https://budibase.com"
const expectedUrl = "https://budibase.com"
expect(addTenantToUrl(url)).toEqual(expectedUrl)
})
})