]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/email.ts
Introduce playlist command
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / email.ts
index 41071692a5fe7f396de45e36cb202a9fa66a86a0..5d997713b6aa549855068c2361e28fb20802deba 100644 (file)
@@ -4,15 +4,12 @@ import 'mocha'
 import * as chai from 'chai'
 import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 import {
-  addVideoToBlacklist,
   askResetPassword,
   askSendVerifyEmail,
   blockUser,
   cleanupTests,
   createUser,
   flushAndRunServer,
-  removeVideoFromBlacklist,
-  reportAbuse,
   resetPassword,
   ServerInfo,
   setAccessTokensToServers,
@@ -190,7 +187,7 @@ describe('Test emails', function () {
       this.timeout(10000)
 
       const reason = 'my super bad reason'
-      await reportAbuse({ url: server.url, token: server.accessToken, videoId, reason })
+      await server.abusesCommand.report({ videoId, reason })
 
       await waitJobs(server)
       expect(emails).to.have.lengthOf(3)
@@ -249,7 +246,7 @@ describe('Test emails', function () {
       this.timeout(10000)
 
       const reason = 'my super reason'
-      await addVideoToBlacklist(server.url, server.accessToken, videoUserUUID, reason)
+      await server.blacklistCommand.add({ videoId: videoUserUUID, reason })
 
       await waitJobs(server)
       expect(emails).to.have.lengthOf(6)
@@ -267,7 +264,7 @@ describe('Test emails', function () {
     it('Should send the notification email', async function () {
       this.timeout(10000)
 
-      await removeVideoFromBlacklist(server.url, server.accessToken, videoUserUUID)
+      await server.blacklistCommand.remove({ videoId: videoUserUUID })
 
       await waitJobs(server)
       expect(emails).to.have.lengthOf(7)