diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/videos/video-playlists.ts | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 6a18cf26a..e8e653382 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts | |||
@@ -3,6 +3,7 @@ | |||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' | 4 | import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { uuidToShort } from '@shared/extra-utils' | ||
6 | import { | 7 | import { |
7 | HttpStatusCode, | 8 | HttpStatusCode, |
8 | VideoPlaylist, | 9 | VideoPlaylist, |
@@ -23,7 +24,6 @@ import { | |||
23 | setDefaultVideoChannel, | 24 | setDefaultVideoChannel, |
24 | waitJobs | 25 | waitJobs |
25 | } from '@shared/server-commands' | 26 | } from '@shared/server-commands' |
26 | import { uuidToShort } from '@shared/extra-utils' | ||
27 | 27 | ||
28 | async function checkPlaylistElementType ( | 28 | async function checkPlaylistElementType ( |
29 | servers: PeerTubeServer[], | 29 | servers: PeerTubeServer[], |
@@ -752,19 +752,6 @@ describe('Test video playlists', function () { | |||
752 | await checkPlaylistElementType(group2, playlistServer1UUID2, VideoPlaylistElementType.REGULAR, position, name, 3) | 752 | await checkPlaylistElementType(group2, playlistServer1UUID2, VideoPlaylistElementType.REGULAR, position, name, 3) |
753 | } | 753 | } |
754 | }) | 754 | }) |
755 | |||
756 | it('Should hide the video if it is NSFW', async function () { | ||
757 | const body = await commands[0].listVideos({ token: userTokenServer1, playlistId: playlistServer1UUID2, query: { nsfw: 'false' } }) | ||
758 | expect(body.total).to.equal(3) | ||
759 | |||
760 | const elements = body.data | ||
761 | const element = elements.find(e => e.position === 3) | ||
762 | |||
763 | expect(element).to.exist | ||
764 | expect(element.video).to.be.null | ||
765 | expect(element.type).to.equal(VideoPlaylistElementType.UNAVAILABLE) | ||
766 | }) | ||
767 | |||
768 | }) | 755 | }) |
769 | 756 | ||
770 | describe('Managing playlist elements', function () { | 757 | describe('Managing playlist elements', function () { |