diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/fixtures/avatar-resized.png | bin | 2420 -> 1727 bytes | |||
-rw-r--r-- | server/tests/api/fixtures/avatar2-resized.png | bin | 2350 -> 1725 bytes | |||
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 6 | ||||
-rw-r--r-- | server/tests/api/users/users.ts | 3 | ||||
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 3 | ||||
-rw-r--r-- | server/tests/api/videos/single-server.ts | 4 | ||||
-rw-r--r-- | server/tests/api/videos/video-comments.ts | 3 |
7 files changed, 6 insertions, 13 deletions
diff --git a/server/tests/api/fixtures/avatar-resized.png b/server/tests/api/fixtures/avatar-resized.png index e05fc07ce..9d84151f8 100644 --- a/server/tests/api/fixtures/avatar-resized.png +++ b/server/tests/api/fixtures/avatar-resized.png | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/avatar2-resized.png b/server/tests/api/fixtures/avatar2-resized.png index a2e2613bf..44149facb 100644 --- a/server/tests/api/fixtures/avatar2-resized.png +++ b/server/tests/api/fixtures/avatar2-resized.png | |||
Binary files differ | |||
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 0483b9c3d..3c4eaff14 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -65,8 +65,7 @@ describe('Test users with multiple servers', function () { | |||
65 | const res = await getMyUserInformation(servers[0].url, servers[0].accessToken) | 65 | const res = await getMyUserInformation(servers[0].url, servers[0].accessToken) |
66 | user = res.body | 66 | user = res.body |
67 | 67 | ||
68 | const test = await testImage(servers[0].url, 'avatar2-resized', user.account.avatar.path, '.png') | 68 | await testImage(servers[0].url, 'avatar2-resized', user.account.avatar.path, '.png') |
69 | expect(test).to.equal(true) | ||
70 | 69 | ||
71 | await wait(5000) | 70 | await wait(5000) |
72 | }) | 71 | }) |
@@ -83,8 +82,7 @@ describe('Test users with multiple servers', function () { | |||
83 | expect(rootServer1Get.name).to.equal('root') | 82 | expect(rootServer1Get.name).to.equal('root') |
84 | expect(rootServer1Get.host).to.equal('localhost:9001') | 83 | expect(rootServer1Get.host).to.equal('localhost:9001') |
85 | 84 | ||
86 | const test = await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') | 85 | await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') |
87 | expect(test).to.equal(true) | ||
88 | } | 86 | } |
89 | }) | 87 | }) |
90 | 88 | ||
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index c23b58089..ac167d4f9 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -359,8 +359,7 @@ describe('Test users', function () { | |||
359 | const res = await getMyUserInformation(server.url, accessTokenUser) | 359 | const res = await getMyUserInformation(server.url, accessTokenUser) |
360 | const user = res.body | 360 | const user = res.body |
361 | 361 | ||
362 | const test = await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.png') | 362 | await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.png') |
363 | expect(test).to.equal(true) | ||
364 | }) | 363 | }) |
365 | 364 | ||
366 | it('Should be able to update another user', async function () { | 365 | it('Should be able to update another user', async function () { |
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 3646fbb0f..85d158d61 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -641,8 +641,7 @@ describe('Test multiple servers', function () { | |||
641 | const res = await getVideo(server.url, videoUUID) | 641 | const res = await getVideo(server.url, videoUUID) |
642 | const video = res.body | 642 | const video = res.body |
643 | 643 | ||
644 | const test = await testImage(server.url, 'video_short1-preview.webm', video.previewPath) | 644 | await testImage(server.url, 'video_short1-preview.webm', video.previewPath) |
645 | expect(test).to.equal(true) | ||
646 | } | 645 | } |
647 | }) | 646 | }) |
648 | }) | 647 | }) |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 476a25479..8f55075fb 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -341,9 +341,7 @@ describe('Test a single server', function () { | |||
341 | 341 | ||
342 | for (const video of videos) { | 342 | for (const video of videos) { |
343 | const videoName = video.name.replace(' name', '') | 343 | const videoName = video.name.replace(' name', '') |
344 | const test = await testImage(server.url, videoName, video.thumbnailPath) | 344 | await testImage(server.url, videoName, video.thumbnailPath) |
345 | |||
346 | expect(test).to.equal(true) | ||
347 | } | 345 | } |
348 | }) | 346 | }) |
349 | 347 | ||
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index cf8166a96..f83d95088 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/video-comments.ts | |||
@@ -83,8 +83,7 @@ describe('Test video comments', function () { | |||
83 | expect(comment.account.name).to.equal('root') | 83 | expect(comment.account.name).to.equal('root') |
84 | expect(comment.account.host).to.equal('localhost:9001') | 84 | expect(comment.account.host).to.equal('localhost:9001') |
85 | 85 | ||
86 | const test = await testImage(server.url, 'avatar-resized', comment.account.avatar.path, '.png') | 86 | await testImage(server.url, 'avatar-resized', comment.account.avatar.path, '.png') |
87 | expect(test).to.equal(true) | ||
88 | 87 | ||
89 | expect(comment.totalReplies).to.equal(0) | 88 | expect(comment.totalReplies).to.equal(0) |
90 | expect(dateIsValid(comment.createdAt as string)).to.be.true | 89 | expect(dateIsValid(comment.createdAt as string)).to.be.true |