diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-28 16:11:52 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-28 16:17:37 +0200 |
commit | eeb838faf2ac3cb3bd42f68fafb4f78af4547a09 (patch) | |
tree | c814953de92a45a81b159a9d8778581b4fc8a2af /server/tests | |
parent | 74c8d5bf2d807870ed351fb2a0ee7137987aa995 (diff) | |
download | PeerTube-eeb838faf2ac3cb3bd42f68fafb4f78af4547a09.tar.gz PeerTube-eeb838faf2ac3cb3bd42f68fafb4f78af4547a09.tar.zst PeerTube-eeb838faf2ac3cb3bd42f68fafb4f78af4547a09.zip |
currentTime is now required
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/check-params/views.ts | 5 | ||||
-rw-r--r-- | server/tests/api/videos/videos-common-filters.ts | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/api/check-params/views.ts b/server/tests/api/check-params/views.ts index 84d31c509..11416ccb8 100644 --- a/server/tests/api/check-params/views.ts +++ b/server/tests/api/check-params/views.ts | |||
@@ -43,8 +43,9 @@ describe('Test videos views', function () { | |||
43 | 43 | ||
44 | describe('When viewing a video', async function () { | 44 | describe('When viewing a video', async function () { |
45 | 45 | ||
46 | // TODO: implement it when we'll remove backward compatibility in REST API | 46 | it('Should fail without current time', async function () { |
47 | it('Should fail without current time') | 47 | await servers[0].views.view({ id: videoId, currentTime: undefined, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) |
48 | }) | ||
48 | 49 | ||
49 | it('Should fail with an invalid current time', async function () { | 50 | it('Should fail with an invalid current time', async function () { |
50 | await servers[0].views.view({ id: videoId, currentTime: -1, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) | 51 | await servers[0].views.view({ id: videoId, currentTime: -1, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) |
diff --git a/server/tests/api/videos/videos-common-filters.ts b/server/tests/api/videos/videos-common-filters.ts index f68560b06..fac0f5dc5 100644 --- a/server/tests/api/videos/videos-common-filters.ts +++ b/server/tests/api/videos/videos-common-filters.ts | |||
@@ -546,7 +546,7 @@ describe('Test videos filter', function () { | |||
546 | 546 | ||
547 | expect(foundVideo).to.not.be.undefined | 547 | expect(foundVideo).to.not.be.undefined |
548 | } | 548 | } |
549 | await servers[0].views.view({ id, token: servers[0].accessToken }) | 549 | await servers[0].views.view({ id, currentTime: 1, token: servers[0].accessToken }) |
550 | 550 | ||
551 | for (const path of paths) { | 551 | for (const path of paths) { |
552 | const videos = await listVideos({ server: servers[0], path, excludeAlreadyWatched: true }) | 552 | const videos = await listVideos({ server: servers[0], path, excludeAlreadyWatched: true }) |