aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/tests/api/server/services.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tests/api/server/services.ts b/server/tests/api/server/services.ts
index ea64e4040..0adf6b667 100644
--- a/server/tests/api/server/services.ts
+++ b/server/tests/api/server/services.ts
@@ -6,7 +6,6 @@ import { Video, VideoPlaylistPrivacy } from '@shared/models'
6import { 6import {
7 addVideoInPlaylist, 7 addVideoInPlaylist,
8 createVideoPlaylist, 8 createVideoPlaylist,
9 getOEmbed,
10 getVideosList, 9 getVideosList,
11 ServerInfo, 10 ServerInfo,
12 setAccessTokensToServers, 11 setAccessTokensToServers,
@@ -70,7 +69,7 @@ describe('Test services', function () {
70 for (const basePath of [ '/videos/watch/', '/w/' ]) { 69 for (const basePath of [ '/videos/watch/', '/w/' ]) {
71 const oembedUrl = 'http://localhost:' + server.port + basePath + video.uuid 70 const oembedUrl = 'http://localhost:' + server.port + basePath + video.uuid
72 71
73 const res = await getOEmbed(server.url, oembedUrl) 72 const res = await server.servicesCommand.getOEmbed({ oembedUrl })
74 const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' + 73 const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' +
75 `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` + 74 `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
76 'frameborder="0" allowfullscreen></iframe>' 75 'frameborder="0" allowfullscreen></iframe>'
@@ -91,7 +90,7 @@ describe('Test services', function () {
91 for (const basePath of [ '/videos/watch/playlist/', '/w/p/' ]) { 90 for (const basePath of [ '/videos/watch/playlist/', '/w/p/' ]) {
92 const oembedUrl = 'http://localhost:' + server.port + basePath + playlistUUID 91 const oembedUrl = 'http://localhost:' + server.port + basePath + playlistUUID
93 92
94 const res = await getOEmbed(server.url, oembedUrl) 93 const res = await server.servicesCommand.getOEmbed({ oembedUrl })
95 const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' + 94 const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' +
96 `title="${playlistDisplayName}" src="http://localhost:${server.port}/video-playlists/embed/${playlistUUID}" ` + 95 `title="${playlistDisplayName}" src="http://localhost:${server.port}/video-playlists/embed/${playlistUUID}" ` +
97 'frameborder="0" allowfullscreen></iframe>' 96 'frameborder="0" allowfullscreen></iframe>'
@@ -114,7 +113,7 @@ describe('Test services', function () {
114 const maxHeight = 50 113 const maxHeight = 50
115 const maxWidth = 50 114 const maxWidth = 50
116 115
117 const res = await getOEmbed(server.url, oembedUrl, format, maxHeight, maxWidth) 116 const res = await server.servicesCommand.getOEmbed({ oembedUrl, format, maxHeight, maxWidth })
118 const expectedHtml = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts" ' + 117 const expectedHtml = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts" ' +
119 `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` + 118 `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
120 'frameborder="0" allowfullscreen></iframe>' 119 'frameborder="0" allowfullscreen></iframe>'