mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
remove obsolete code
This commit is contained in:
parent
677a012535
commit
5ea89d3575
@ -205,29 +205,6 @@ describe('mergeImage', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('given a `S3_PUBLIC_GATEWAY` configuration', () => {
|
||||
const { mergeImage } = images({
|
||||
...config,
|
||||
S3_PUBLIC_GATEWAY: 'http://s3-public-gateway.com',
|
||||
})
|
||||
|
||||
it('changes the domain of the URL to a server that could e.g. apply image transformations', async () => {
|
||||
if (!imageInput.upload) {
|
||||
throw new Error('Test imageInput was not setup correctly.')
|
||||
}
|
||||
const upload = await imageInput.upload
|
||||
upload.filename = '/path/to/file-location/foo-bar-avatar.jpg'
|
||||
imageInput.upload = Promise.resolve(upload)
|
||||
await expect(
|
||||
mergeImage(post, 'HERO_IMAGE', imageInput, { uploadCallback, deleteCallback }),
|
||||
).resolves.toMatchObject({
|
||||
url: expect.stringMatching(
|
||||
new RegExp(`^http://s3-public-gateway.com/bucket/${uuid}-foo-bar-avatar.jpg`),
|
||||
),
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('connects resource with image via given image type', async () => {
|
||||
await mergeImage(post, 'HERO_IMAGE', imageInput, { uploadCallback, deleteCallback })
|
||||
const result = await neode.cypher(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user