diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/single-server.ts | 5 | ||||
-rw-r--r-- | server/tests/utils/videos.ts | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/server/tests/api/single-server.ts b/server/tests/api/single-server.ts index fbb2dd1fb..ed79f9e1c 100644 --- a/server/tests/api/single-server.ts +++ b/server/tests/api/single-server.ts | |||
@@ -104,7 +104,10 @@ describe('Test a single server', function () { | |||
104 | licence: 6, | 104 | licence: 6, |
105 | tags: [ 'tag1', 'tag2', 'tag3' ] | 105 | tags: [ 'tag1', 'tag2', 'tag3' ] |
106 | } | 106 | } |
107 | await uploadVideo(server.url, server.accessToken, videoAttributes) | 107 | const res = await uploadVideo(server.url, server.accessToken, videoAttributes) |
108 | expect(res.body.video).to.not.be.undefined | ||
109 | expect(res.body.video.id).to.equal(1) | ||
110 | expect(res.body.video.uuid).to.have.length.above(5) | ||
108 | }) | 111 | }) |
109 | 112 | ||
110 | it('Should seed the uploaded video', async function () { | 113 | it('Should seed the uploaded video', async function () { |
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts index ff7da9bb2..bdf3368ac 100644 --- a/server/tests/utils/videos.ts +++ b/server/tests/utils/videos.ts | |||
@@ -201,7 +201,7 @@ async function testVideoImage (url: string, imageName: string, imagePath: string | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | async function uploadVideo (url: string, accessToken: string, videoAttributesArg: VideoAttributes, specialStatus = 204) { | 204 | async function uploadVideo (url: string, accessToken: string, videoAttributesArg: VideoAttributes, specialStatus = 201) { |
205 | const path = '/api/v1/videos/upload' | 205 | const path = '/api/v1/videos/upload' |
206 | let defaultChannelId = '1' | 206 | let defaultChannelId = '1' |
207 | 207 | ||