changing url

This commit is contained in:
Mateus Badan de Pieri 2023-03-30 13:42:04 +01:00
parent 0c10803cd9
commit 02f33b59bb
1 changed files with 6 additions and 6 deletions

View File

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