diff options
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r-- | server/tests/api/videos/single-server.ts | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index cf2721838..7c4bdf8bc 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -27,8 +27,10 @@ describe('Test a single server', function () { | |||
27 | nsfw: true, | 27 | nsfw: true, |
28 | description: 'my super description', | 28 | description: 'my super description', |
29 | support: 'my super support text', | 29 | support: 'my super support text', |
30 | host: 'localhost:9001', | 30 | account: { |
31 | account: 'root', | 31 | name: 'root', |
32 | host: 'localhost:9001' | ||
33 | }, | ||
32 | isLocal: true, | 34 | isLocal: true, |
33 | duration: 5, | 35 | duration: 5, |
34 | tags: [ 'tag1', 'tag2', 'tag3' ], | 36 | tags: [ 'tag1', 'tag2', 'tag3' ], |
@@ -56,8 +58,10 @@ describe('Test a single server', function () { | |||
56 | nsfw: false, | 58 | nsfw: false, |
57 | description: 'my super description updated', | 59 | description: 'my super description updated', |
58 | support: 'my super support text updated', | 60 | support: 'my super support text updated', |
59 | host: 'localhost:9001', | 61 | account: { |
60 | account: 'root', | 62 | name: 'root', |
63 | host: 'localhost:9001' | ||
64 | }, | ||
61 | isLocal: true, | 65 | isLocal: true, |
62 | tags: [ 'tagup1', 'tagup2' ], | 66 | tags: [ 'tagup1', 'tagup2' ], |
63 | privacy: VideoPrivacy.PUBLIC, | 67 | privacy: VideoPrivacy.PUBLIC, |
@@ -205,32 +209,6 @@ describe('Test a single server', function () { | |||
205 | }) | 209 | }) |
206 | 210 | ||
207 | // Not implemented yet | 211 | // Not implemented yet |
208 | // it('Should search the video by serverHost', async function () { | ||
209 | // const res = await videosUtils.searchVideo(server.url, '9001', 'host') | ||
210 | |||
211 | // expect(res.body.total).to.equal(1) | ||
212 | // expect(res.body.data).to.be.an('array') | ||
213 | // expect(res.body.data.length).to.equal(1) | ||
214 | |||
215 | // const video = res.body.data[0] | ||
216 | // expect(video.name).to.equal('my super name') | ||
217 | // expect(video.description).to.equal('my super description') | ||
218 | // expect(video.serverHost).to.equal('localhost:9001') | ||
219 | // expect(video.author).to.equal('root') | ||
220 | // expect(video.isLocal).to.be.true | ||
221 | // expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | ||
222 | // expect(dateIsValid(video.createdAt)).to.be.true | ||
223 | // expect(dateIsValid(video.updatedAt)).to.be.true | ||
224 | |||
225 | // const test = await testVideoImage(server.url, 'video_short.webm', video.thumbnailPath) | ||
226 | // expect(test).to.equal(true) | ||
227 | |||
228 | // done() | ||
229 | // }) | ||
230 | // }) | ||
231 | // }) | ||
232 | |||
233 | // Not implemented yet | ||
234 | // it('Should search the video by tag', async function () { | 212 | // it('Should search the video by tag', async function () { |
235 | // const res = await searchVideo(server.url, 'tag1') | 213 | // const res = await searchVideo(server.url, 'tag1') |
236 | // | 214 | // |
@@ -248,8 +226,8 @@ describe('Test a single server', function () { | |||
248 | // expect(video.languageLabel).to.equal('Mandarin') | 226 | // expect(video.languageLabel).to.equal('Mandarin') |
249 | // expect(video.nsfw).to.be.ok | 227 | // expect(video.nsfw).to.be.ok |
250 | // expect(video.description).to.equal('my super description') | 228 | // expect(video.description).to.equal('my super description') |
251 | // expect(video.serverHost).to.equal('localhost:9001') | 229 | // expect(video.account.name).to.equal('root') |
252 | // expect(video.accountName).to.equal('root') | 230 | // expect(video.account.host).to.equal('localhost:9001') |
253 | // expect(video.isLocal).to.be.true | 231 | // expect(video.isLocal).to.be.true |
254 | // expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | 232 | // expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) |
255 | // expect(dateIsValid(video.createdAt)).to.be.true | 233 | // expect(dateIsValid(video.createdAt)).to.be.true |