]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-playlists.ts
Remove unused actor uuid field
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-playlists.ts
index 83a2f3d4d81550a3e926e6af7896477abe41a62b..3ebb1df0b588af604d3a733d7704c9a1b74ba99b 100644 (file)
@@ -36,7 +36,8 @@ import {
   uploadVideo,
   uploadVideoAndGetId,
   userLogin,
-  waitJobs
+  waitJobs,
+  generateUserAccessToken
 } from '../../../../shared/extra-utils'
 import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
 import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
@@ -138,6 +139,18 @@ describe('Test video playlists', function () {
     }
   })
 
+  it('Should get private playlist for a classic user', async function () {
+    const token = await generateUserAccessToken(servers[0], 'toto')
+
+    const res = await getAccountPlaylistsListWithToken(servers[0].url, token, 'toto', 0, 5)
+
+    expect(res.body.total).to.equal(1)
+    expect(res.body.data).to.have.lengthOf(1)
+
+    const playlistId = res.body.data[0].id
+    await getPlaylistVideos(servers[0].url, token, playlistId, 0, 5)
+  })
+
   it('Should create a playlist on server 1 and have the playlist on server 2 and 3', async function () {
     this.timeout(30000)