diff options
Diffstat (limited to 'server/tests/cli/peertube.ts')
-rw-r--r-- | server/tests/cli/peertube.ts | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index 034d216e3..3aa24a0f8 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts | |||
@@ -136,9 +136,26 @@ describe('Test CLI wrapper', function () { | |||
136 | expect(videoDetails.channel.name).to.equal('user_channel') | 136 | expect(videoDetails.channel.name).to.equal('user_channel') |
137 | expect(videoDetails.support).to.equal('super support text') | 137 | expect(videoDetails.support).to.equal('super support text') |
138 | expect(videoDetails.nsfw).to.be.false | 138 | expect(videoDetails.nsfw).to.be.false |
139 | }) | ||
140 | |||
141 | it('Should not import again the same video', async function () { | ||
142 | if (areHttpImportTestsDisabled()) return | ||
143 | |||
144 | this.timeout(60000) | ||
145 | |||
146 | const params = `--target-url ${FIXTURE_URLS.youtube} --channel-name user_channel` | ||
147 | await cliCommand.execWithEnv(`${cmd} import ${params}`) | ||
148 | |||
149 | await waitJobs([ server ]) | ||
150 | |||
151 | const { total, data } = await server.videos.list() | ||
152 | expect(total).to.equal(2) | ||
153 | |||
154 | const videos = data.filter(v => v.name === 'small video - youtube') | ||
155 | expect(videos).to.have.lengthOf(1) | ||
139 | 156 | ||
140 | // So we can reimport it | 157 | // So we can reimport it |
141 | await server.videos.remove({ token: userAccessToken, id: video.id }) | 158 | await server.videos.remove({ token: userAccessToken, id: videos[0].id }) |
142 | }) | 159 | }) |
143 | 160 | ||
144 | it('Should import and override some imported attributes', async function () { | 161 | it('Should import and override some imported attributes', async function () { |