diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-26 16:11:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-26 16:18:01 +0200 |
commit | 08c1efbe32244c321de28b0f2a6aaa3f99f46b58 (patch) | |
tree | 10a1b6c12f3e30a20f3d0dd66c698d9bae2aa41f /server/tests/api/check-params | |
parent | 7de6afdf542da6968d3f412df9c3318ba19ad229 (diff) | |
download | PeerTube-08c1efbe32244c321de28b0f2a6aaa3f99f46b58.tar.gz PeerTube-08c1efbe32244c321de28b0f2a6aaa3f99f46b58.tar.zst PeerTube-08c1efbe32244c321de28b0f2a6aaa3f99f46b58.zip |
Add video channel management
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/video-channels.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index 7cda879ed..40a8e97cc 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -25,7 +25,7 @@ import { User } from '../../../../shared/models/users' | |||
25 | 25 | ||
26 | const expect = chai.expect | 26 | const expect = chai.expect |
27 | 27 | ||
28 | describe('Test videos API validator', function () { | 28 | describe('Test video channels API validator', function () { |
29 | const videoChannelPath = '/api/v1/video-channels' | 29 | const videoChannelPath = '/api/v1/video-channels' |
30 | let server: ServerInfo | 30 | let server: ServerInfo |
31 | let accessTokenUser: string | 31 | let accessTokenUser: string |
@@ -85,7 +85,7 @@ describe('Test videos API validator', function () { | |||
85 | 85 | ||
86 | describe('When adding a video channel', function () { | 86 | describe('When adding a video channel', function () { |
87 | const baseCorrectParams = { | 87 | const baseCorrectParams = { |
88 | name: 'hello', | 88 | displayName: 'hello', |
89 | description: 'super description', | 89 | description: 'super description', |
90 | support: 'super support text' | 90 | support: 'super support text' |
91 | } | 91 | } |
@@ -105,13 +105,13 @@ describe('Test videos API validator', function () { | |||
105 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 105 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
106 | }) | 106 | }) |
107 | 107 | ||
108 | it('Should fail without name', async function () { | 108 | it('Should fail without a name', async function () { |
109 | const fields = omit(baseCorrectParams, 'name') | 109 | const fields = omit(baseCorrectParams, 'displayName') |
110 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 110 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
111 | }) | 111 | }) |
112 | 112 | ||
113 | it('Should fail with a long name', async function () { | 113 | it('Should fail with a long name', async function () { |
114 | const fields = immutableAssign(baseCorrectParams, { name: 'super'.repeat(25) }) | 114 | const fields = immutableAssign(baseCorrectParams, { displayName: 'super'.repeat(25) }) |
115 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 115 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
116 | }) | 116 | }) |
117 | 117 | ||
@@ -138,7 +138,7 @@ describe('Test videos API validator', function () { | |||
138 | 138 | ||
139 | describe('When updating a video channel', function () { | 139 | describe('When updating a video channel', function () { |
140 | const baseCorrectParams = { | 140 | const baseCorrectParams = { |
141 | name: 'hello', | 141 | displayName: 'hello', |
142 | description: 'super description' | 142 | description: 'super description' |
143 | } | 143 | } |
144 | let path: string | 144 | let path: string |
@@ -168,7 +168,7 @@ describe('Test videos API validator', function () { | |||
168 | }) | 168 | }) |
169 | 169 | ||
170 | it('Should fail with a long name', async function () { | 170 | it('Should fail with a long name', async function () { |
171 | const fields = immutableAssign(baseCorrectParams, { name: 'super'.repeat(25) }) | 171 | const fields = immutableAssign(baseCorrectParams, { displayName: 'super'.repeat(25) }) |
172 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) | 172 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) |
173 | }) | 173 | }) |
174 | 174 | ||