Skip to content

Commit 6c67390

Browse files
committed
test: Use image fixture rather than hotlinked one
1 parent 685485d commit 6c67390

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/integration/asset-integration.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const TEST_IMAGE_SOURCE_URL = 'https://raw.githubusercontent.com/contentful/contentful-management.js/next/test/integration/fixtures/shiba-stuck-bush.jpg'
2+
13
export function assetReadOnlyTests (t, space) {
24
t.test('Gets assets with only images', (t) => {
35
t.plan(1)
@@ -28,7 +30,6 @@ export function assetReadOnlyTests (t, space) {
2830
}
2931

3032
export function assetWriteTests (t, space) {
31-
// TODO upload file to github repo to use as fixture
3233
t.test('Create, process, update, publish, unpublish, archive, unarchive and delete asset', (t) => {
3334
t.plan(7)
3435

@@ -37,7 +38,7 @@ export function assetWriteTests (t, space) {
3738
file: {'en-US': {
3839
contentType: 'image/jpeg',
3940
fileName: 'shiba-stuck.jpg',
40-
upload: 'http://shiba.fr/wp-content/uploads/shiba-stuck-bush.jpg'
41+
upload: TEST_IMAGE_SOURCE_URL
4142
}}
4243
}})
4344
.then((asset) => {
@@ -80,12 +81,12 @@ export function assetWriteTests (t, space) {
8081
'en-US': {
8182
contentType: 'image/jpeg',
8283
fileName: 'shiba-stuck.jpg',
83-
upload: 'http://shiba.fr/wp-content/uploads/shiba-stuck-bush.jpg'
84+
upload: TEST_IMAGE_SOURCE_URL
8485
},
8586
'de-DE': {
8687
contentType: 'image/jpeg',
8788
fileName: 'shiba-stuck.jpg',
88-
upload: 'http://shiba.fr/wp-content/uploads/shiba-stuck-bush.jpg'
89+
upload: TEST_IMAGE_SOURCE_URL
8990
}
9091
}
9192
}})

0 commit comments

Comments
 (0)