aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-four/main.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-four/main.js b/server/tests/fixtures/peertube-plugin-test-four/main.js
index 067c3fe15..8df456c8a 100644
--- a/server/tests/fixtures/peertube-plugin-test-four/main.js
+++ b/server/tests/fixtures/peertube-plugin-test-four/main.js
@@ -24,8 +24,13 @@ async function register ({
24 registerHook({ 24 registerHook({
25 target: 'action:api.video.viewed', 25 target: 'action:api.video.viewed',
26 handler: async ({ video }) => { 26 handler: async ({ video }) => {
27 const videoFromDB = await peertubeHelpers.videos.loadByUrl(video.url) 27 const videoFromDB1 = await peertubeHelpers.videos.loadByUrl(video.url)
28 logger.info('video from DB uuid is %s.', videoFromDB.uuid) 28 const videoFromDB2 = await peertubeHelpers.videos.loadByIdOrUUID(video.id)
29 const videoFromDB3 = await peertubeHelpers.videos.loadByIdOrUUID(video.uuid)
30
31 if (videoFromDB1.uuid !== videoFromDB2.uuid || videoFromDB2.uuid !== videoFromDB3.uuid) return
32
33 logger.info('video from DB uuid is %s.', videoFromDB1.uuid)
29 34
30 await peertubeHelpers.videos.removeVideo(video.id) 35 await peertubeHelpers.videos.removeVideo(video.id)
31 36