diff options
Diffstat (limited to 'server/tests/api/search')
-rw-r--r-- | server/tests/api/search/search-videos.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index a3e05156b..7882d9373 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts | |||
@@ -20,6 +20,7 @@ const expect = chai.expect | |||
20 | describe('Test videos search', function () { | 20 | describe('Test videos search', function () { |
21 | let server: ServerInfo = null | 21 | let server: ServerInfo = null |
22 | let startDate: string | 22 | let startDate: string |
23 | let videoUUID: string | ||
23 | 24 | ||
24 | before(async function () { | 25 | before(async function () { |
25 | this.timeout(30000) | 26 | this.timeout(30000) |
@@ -46,6 +47,7 @@ describe('Test videos search', function () { | |||
46 | const attributes3 = immutableAssign(attributes1, { name: attributes1.name + ' - 3', language: undefined }) | 47 | const attributes3 = immutableAssign(attributes1, { name: attributes1.name + ' - 3', language: undefined }) |
47 | const res = await uploadVideo(server.url, server.accessToken, attributes3) | 48 | const res = await uploadVideo(server.url, server.accessToken, attributes3) |
48 | const videoId = res.body.video.id | 49 | const videoId = res.body.video.id |
50 | videoUUID = res.body.video.uuid | ||
49 | 51 | ||
50 | await createVideoCaption({ | 52 | await createVideoCaption({ |
51 | url: server.url, | 53 | url: server.url, |
@@ -439,6 +441,14 @@ describe('Test videos search', function () { | |||
439 | } | 441 | } |
440 | }) | 442 | }) |
441 | 443 | ||
444 | it('Should search by UUID', async function () { | ||
445 | const search = videoUUID | ||
446 | const res = await advancedVideosSearch(server.url, { search }) | ||
447 | |||
448 | expect(res.body.total).to.equal(1) | ||
449 | expect(res.body.data[0].name).to.equal('1111 2222 3333 - 3') | ||
450 | }) | ||
451 | |||
442 | after(async function () { | 452 | after(async function () { |
443 | await cleanupTests([ server ]) | 453 | await cleanupTests([ server ]) |
444 | }) | 454 | }) |