]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/email.ts
Introduce abuse command
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / email.ts
index 92768d9dfca59c26f34d401b0a1668b6bbe7aa26..85844ae9df7c3c7fd2af2c5f76056027a9122af1 100644 (file)
@@ -2,6 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
+import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 import {
   addVideoToBlacklist,
   askResetPassword,
@@ -11,7 +12,6 @@ import {
   createUser,
   flushAndRunServer,
   removeVideoFromBlacklist,
-  reportAbuse,
   resetPassword,
   ServerInfo,
   setAccessTokensToServers,
@@ -20,9 +20,8 @@ import {
   userLogin,
   verifyEmail
 } from '../../../../shared/extra-utils'
-import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
 import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 
 const expect = chai.expect
 
@@ -190,7 +189,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)