X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Fvideo-constants.ts;h=4a05af042623cabfe385221e2a46e8ee932f986c;hb=41d1d075011174e73dccb74006181a92a618d7b4;hp=4124e8a5236c7bb74d91fc100089c9bdaa87a36f;hpb=ae2abfd3aed3e75d39a316b49b914d187faa7475;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts index 4124e8a52..4a05af042 100644 --- a/server/tests/plugins/video-constants.ts +++ b/server/tests/plugins/video-constants.ts @@ -5,13 +5,11 @@ import * as chai from 'chai' import { HttpStatusCode } from '@shared/core-utils' import { cleanupTests, - createVideoPlaylist, flushAndRunServer, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, - getVideoPlaylistPrivacies, getVideoPrivacies, PluginsCommand, ServerInfo, @@ -79,8 +77,7 @@ describe('Test plugin altering video constants', function () { }) it('Should have updated playlist privacies', async function () { - const res = await getVideoPlaylistPrivacies(server.url) - const playlistPrivacies = res.body + const playlistPrivacies = await server.playlistsCommand.getPrivacies() expect(playlistPrivacies[1]).to.exist expect(playlistPrivacies[2]).to.exist @@ -93,13 +90,8 @@ describe('Test plugin altering video constants', function () { }) it('Should not be able to create a video with this privacy', async function () { - const attrs = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE } - await createVideoPlaylist({ - url: server.url, - token: server.accessToken, - playlistAttrs: attrs, - expectedStatus: HttpStatusCode.BAD_REQUEST_400 - }) + const attributes = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE } + await server.playlistsCommand.create({ attributes, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) }) it('Should be able to upload a video with these values', async function () { @@ -162,8 +154,7 @@ describe('Test plugin altering video constants', function () { } { - const res = await getVideoPlaylistPrivacies(server.url) - const playlistPrivacies = res.body + const playlistPrivacies = await server.playlistsCommand.getPrivacies() expect(playlistPrivacies[1]).to.exist expect(playlistPrivacies[2]).to.exist