aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/single-server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/single-server.ts')
-rw-r--r--server/tests/api/single-server.ts37
1 files changed, 0 insertions, 37 deletions
diff --git a/server/tests/api/single-server.ts b/server/tests/api/single-server.ts
index e99955ef4..91460c7ae 100644
--- a/server/tests/api/single-server.ts
+++ b/server/tests/api/single-server.ts
@@ -694,43 +694,6 @@ describe('Test a single server', function () {
694 expect(video.dislikes).to.equal(1) 694 expect(video.dislikes).to.equal(1)
695 }) 695 })
696 696
697 it('Should upload a video with minimum parameters', async function () {
698 const path = '/api/v1/videos/upload'
699
700 const req = request(server.url)
701 .post(path)
702 .set('Accept', 'application/json')
703 .set('Authorization', 'Bearer ' + server.accessToken)
704 .field('name', 'minimum parameters')
705 .field('privacy', '1')
706 .field('nsfw', 'false')
707 .field('channelId', '1')
708
709 const filePath = join(__dirname, '..', 'api', 'fixtures', 'video_short.webm')
710
711 await req.attach('videofile', filePath)
712 .expect(200)
713
714 const res = await getVideosList(server.url)
715 const video = res.body.data.find(v => v.name === 'minimum parameters')
716
717 expect(video.name).to.equal('minimum parameters')
718 expect(video.category).to.equal(null)
719 expect(video.categoryLabel).to.equal('Misc')
720 expect(video.licence).to.equal(null)
721 expect(video.licenceLabel).to.equal('Unknown')
722 expect(video.language).to.equal(null)
723 expect(video.languageLabel).to.equal('Unknown')
724 expect(video.nsfw).to.not.be.ok
725 expect(video.description).to.equal(null)
726 expect(video.serverHost).to.equal('localhost:9001')
727 expect(video.accountName).to.equal('root')
728 expect(video.isLocal).to.be.true
729 expect(video.tags).to.deep.equal([ ])
730 expect(dateIsValid(video.createdAt)).to.be.true
731 expect(dateIsValid(video.updatedAt)).to.be.true
732 })
733
734 after(async function () { 697 after(async function () {
735 killallServers([ server ]) 698 killallServers([ server ])
736 699