aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-06 17:29:15 +0200
committerChocobozzz <me@florianbigard.com>2019-06-06 17:29:15 +0200
commit1b319b7aa6d2f4252615b370aaca6a800be1b1f4 (patch)
tree1d7eed8c392423aa578c609fe269832c5ac99b17 /server/tests/api/videos
parent46a6db245f50249246325090eeaffd165453a396 (diff)
downloadPeerTube-1b319b7aa6d2f4252615b370aaca6a800be1b1f4.tar.gz
PeerTube-1b319b7aa6d2f4252615b370aaca6a800be1b1f4.tar.zst
PeerTube-1b319b7aa6d2f4252615b370aaca6a800be1b1f4.zip
Add ability to unpublish video/playlist
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-playlists.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index 3ebb1df0b..8690327c4 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -754,6 +754,40 @@ describe('Test video playlists', function () {
754 } 754 }
755 }) 755 })
756 756
757
758 it('Should be able to create a public playlist, and set it to private', async function () {
759 this.timeout(30000)
760
761 const res = await createVideoPlaylist({
762 url: servers[0].url,
763 token: servers[0].accessToken,
764 playlistAttrs: {
765 displayName: 'my super public playlist',
766 privacy: VideoPlaylistPrivacy.PUBLIC,
767 videoChannelId: servers[0].videoChannel.id
768 }
769 })
770 const videoPlaylistIds = res.body.videoPlaylist
771
772 await waitJobs(servers)
773
774 for (const server of servers) {
775 await getVideoPlaylist(server.url, videoPlaylistIds.uuid, 200)
776 }
777
778 const playlistAttrs = { privacy: VideoPlaylistPrivacy.PRIVATE }
779 await updateVideoPlaylist({ url: servers[0].url, token: servers[0].accessToken, playlistId: videoPlaylistIds.id, playlistAttrs })
780
781 await waitJobs(servers)
782
783 for (const server of [ servers[1], servers[2] ]) {
784 await getVideoPlaylist(server.url, videoPlaylistIds.uuid, 404)
785 }
786 await getVideoPlaylist(servers[0].url, videoPlaylistIds.uuid, 401)
787
788 await getVideoPlaylistWithToken(servers[0].url, servers[0].accessToken, videoPlaylistIds.uuid, 200)
789 })
790
757 it('Should delete the playlist on server 1 and delete on server 2 and 3', async function () { 791 it('Should delete the playlist on server 1 and delete on server 2 and 3', async function () {
758 this.timeout(30000) 792 this.timeout(30000)
759 793