]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/misc-endpoints.ts
Add plugin hook on registration
[github/Chocobozzz/PeerTube.git] / server / tests / misc-endpoints.ts
index d78b62d60c35186fb4e8f86b03a5fc8b030075a6..ab2dd3a0ff5efd1440659e7c837754a07f74b7b0 100644 (file)
@@ -4,11 +4,10 @@ import 'mocha'
 import * as chai from 'chai'
 import {
   addVideoChannel,
+  cleanupTests,
   createUser,
-  flushTests,
-  killallServers,
+  flushAndRunServer,
   makeGetRequest,
-  runServer,
   ServerInfo,
   setAccessTokensToServers,
   uploadVideo
@@ -23,9 +22,7 @@ describe('Test misc endpoints', function () {
   before(async function () {
     this.timeout(120000)
 
-    await flushTests()
-
-    server = await runServer(1)
+    server = await flushAndRunServer(1)
     await setAccessTokensToServers([ server ])
   })
 
@@ -161,9 +158,9 @@ describe('Test misc endpoints', function () {
       expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
       expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>')
 
-      expect(res.text).to.contain('<video:title><![CDATA[video 1]]></video:title>')
-      expect(res.text).to.contain('<video:title><![CDATA[video 2]]></video:title>')
-      expect(res.text).to.not.contain('<video:title><![CDATA[video 3]]></video:title>')
+      expect(res.text).to.contain('<video:title>video 1</video:title>')
+      expect(res.text).to.contain('<video:title>video 2</video:title>')
+      expect(res.text).to.not.contain('<video:title>video 3</video:title>')
 
       expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel1</loc></url>')
       expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel2</loc></url>')
@@ -174,6 +171,6 @@ describe('Test misc endpoints', function () {
   })
 
   after(async function () {
-    killallServers([ server ])
+    await cleanupTests([ server ])
   })
 })