From e6346d59e63135cf012ed18c102d3b0179ef565f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Jul 2021 15:54:39 +0200 Subject: Introduce playlist command --- server/tests/api/check-params/services.ts | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'server/tests/api/check-params/services.ts') diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 514e3da70..595fab70d 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts @@ -1,19 +1,17 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' - +import { VideoPlaylistPrivacy } from '@shared/models' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' import { cleanupTests, flushAndRunServer, makeGetRequest, ServerInfo, setAccessTokensToServers, - uploadVideo, - createVideoPlaylist, - setDefaultVideoChannel + setDefaultVideoChannel, + uploadVideo } from '../../../../shared/extra-utils' -import { VideoPlaylistPrivacy } from '@shared/models' -import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' describe('Test services API validators', function () { let server: ServerInfo @@ -34,17 +32,15 @@ describe('Test services API validators', function () { } { - const res = await createVideoPlaylist({ - url: server.url, - token: server.accessToken, - playlistAttrs: { + const created = await server.playlistsCommand.create({ + attributes: { displayName: 'super playlist', privacy: VideoPlaylistPrivacy.PUBLIC, videoChannelId: server.videoChannel.id } }) - playlistUUID = res.body.videoPlaylist.uuid + playlistUUID = created.uuid } }) -- cgit v1.2.3