diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-09 15:32:53 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-09 15:32:53 +0100 |
commit | 3cf53828db9b1f0d65e91a07d2a65f2f4ad82270 (patch) | |
tree | 43990a8da7c89eba5a28532e84fa9cebc0dbb369 /server/tests/api | |
parent | 1aa7543403f278ad88d64e368e77bcb3efa58dd7 (diff) | |
download | PeerTube-3cf53828db9b1f0d65e91a07d2a65f2f4ad82270.tar.gz PeerTube-3cf53828db9b1f0d65e91a07d2a65f2f4ad82270.tar.zst PeerTube-3cf53828db9b1f0d65e91a07d2a65f2f4ad82270.zip |
Add ability to search by UUID
Diffstat (limited to 'server/tests/api')
-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 | }) |