Fixing another test depending on mock behaviour.
This commit is contained in:
parent
5b4f71ca08
commit
6e6c3c7bac
|
@ -3,7 +3,7 @@ import { testEnv } from "../../../../tests/extra"
|
||||||
|
|
||||||
describe("global", () => {
|
describe("global", () => {
|
||||||
describe("getGlobalFileUrl", () => {
|
describe("getGlobalFileUrl", () => {
|
||||||
function getGlobalFileUrl() {
|
async function getGlobalFileUrl() {
|
||||||
return global.getGlobalFileUrl("settings", "logoUrl", "etag")
|
return global.getGlobalFileUrl("settings", "logoUrl", "etag")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,18 +12,6 @@ describe("global", () => {
|
||||||
testEnv.singleTenant()
|
testEnv.singleTenant()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("gets url with embedded minio", () => {
|
|
||||||
testEnv.withMinio()
|
|
||||||
const url = getGlobalFileUrl()
|
|
||||||
expect(url).toBe("/files/signed/global/settings/logoUrl")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("gets url with custom S3", () => {
|
|
||||||
testEnv.withS3()
|
|
||||||
const url = getGlobalFileUrl()
|
|
||||||
expect(url).toBe("http://s3.example.com/global/settings/logoUrl")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("gets url with cloudfront + s3", async () => {
|
it("gets url with cloudfront + s3", async () => {
|
||||||
testEnv.withCloudfront()
|
testEnv.withCloudfront()
|
||||||
const url = await getGlobalFileUrl()
|
const url = await getGlobalFileUrl()
|
||||||
|
@ -39,24 +27,6 @@ describe("global", () => {
|
||||||
testEnv.multiTenant()
|
testEnv.multiTenant()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("gets url with embedded minio", async () => {
|
|
||||||
testEnv.withMinio()
|
|
||||||
await testEnv.withTenant(tenantId => {
|
|
||||||
const url = getGlobalFileUrl()
|
|
||||||
expect(url).toBe(`/files/signed/global/${tenantId}/settings/logoUrl`)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it("gets url with custom S3", async () => {
|
|
||||||
testEnv.withS3()
|
|
||||||
await testEnv.withTenant(tenantId => {
|
|
||||||
const url = getGlobalFileUrl()
|
|
||||||
expect(url).toBe(
|
|
||||||
`http://s3.example.com/global/${tenantId}/settings/logoUrl`
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it("gets url with cloudfront + s3", async () => {
|
it("gets url with cloudfront + s3", async () => {
|
||||||
testEnv.withCloudfront()
|
testEnv.withCloudfront()
|
||||||
await testEnv.withTenant(async tenantId => {
|
await testEnv.withTenant(async tenantId => {
|
||||||
|
|
Loading…
Reference in New Issue