diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 09:43:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 6c5065a011b099618681a37bd77eaa7bd3db752e (patch) | |
tree | 352252a00b25013c4b1902f6bcd9668aba295c7b /server/tests/api/videos/video-imports.ts | |
parent | 0d8ecb7592577f54012413a2b5a9b159cfc90399 (diff) | |
download | PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.gz PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.zst PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.zip |
Introduce server commands
Diffstat (limited to 'server/tests/api/videos/video-imports.ts')
-rw-r--r-- | server/tests/api/videos/video-imports.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 4f9ecbe8e..f6ae8cab1 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts | |||
@@ -11,7 +11,6 @@ import { | |||
11 | getMyVideos, | 11 | getMyVideos, |
12 | getVideo, | 12 | getVideo, |
13 | getVideosList, | 13 | getVideosList, |
14 | immutableAssign, | ||
15 | ImportsCommand, | 14 | ImportsCommand, |
16 | ServerInfo, | 15 | ServerInfo, |
17 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
@@ -119,7 +118,7 @@ describe('Test video imports', function () { | |||
119 | } | 118 | } |
120 | 119 | ||
121 | { | 120 | { |
122 | const attributes = immutableAssign(baseAttributes, { targetUrl: ImportsCommand.getYoutubeVideoUrl() }) | 121 | const attributes = { ...baseAttributes, targetUrl: ImportsCommand.getYoutubeVideoUrl() } |
123 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) | 122 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) |
124 | expect(video.name).to.equal('small video - youtube') | 123 | expect(video.name).to.equal('small video - youtube') |
125 | 124 | ||
@@ -169,21 +168,23 @@ Ajouter un sous-titre est vraiment facile`) | |||
169 | } | 168 | } |
170 | 169 | ||
171 | { | 170 | { |
172 | const attributes = immutableAssign(baseAttributes, { | 171 | const attributes = { |
172 | ...baseAttributes, | ||
173 | magnetUri: ImportsCommand.getMagnetURI(), | 173 | magnetUri: ImportsCommand.getMagnetURI(), |
174 | description: 'this is a super torrent description', | 174 | description: 'this is a super torrent description', |
175 | tags: [ 'tag_torrent1', 'tag_torrent2' ] | 175 | tags: [ 'tag_torrent1', 'tag_torrent2' ] |
176 | }) | 176 | } |
177 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) | 177 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) |
178 | expect(video.name).to.equal('super peertube2 video') | 178 | expect(video.name).to.equal('super peertube2 video') |
179 | } | 179 | } |
180 | 180 | ||
181 | { | 181 | { |
182 | const attributes = immutableAssign(baseAttributes, { | 182 | const attributes = { |
183 | ...baseAttributes, | ||
183 | torrentfile: 'video-720p.torrent' as any, | 184 | torrentfile: 'video-720p.torrent' as any, |
184 | description: 'this is a super torrent description', | 185 | description: 'this is a super torrent description', |
185 | tags: [ 'tag_torrent1', 'tag_torrent2' ] | 186 | tags: [ 'tag_torrent1', 'tag_torrent2' ] |
186 | }) | 187 | } |
187 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) | 188 | const { video } = await servers[0].importsCommand.importVideo({ attributes }) |
188 | expect(video.name).to.equal('你好 世界 720p.mp4') | 189 | expect(video.name).to.equal('你好 世界 720p.mp4') |
189 | } | 190 | } |