diff options
author | BRAINS YUM <43896676+McFlat@users.noreply.github.com> | 2018-10-19 01:54:01 -0500 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-19 08:54:01 +0200 |
commit | d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e (patch) | |
tree | e5a11500d446b585716d451dd274e8567d36cd2a /server/tests/api/check-params/video-channels.ts | |
parent | e0628695c3425bf69b5d7a46b24dcdf31892d9b6 (diff) | |
download | PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.tar.gz PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.tar.zst PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.zip |
Feature/description support fields length 1000 (#1267)
* fix migrations to not use config constant values as it can introduce bugs later when they change; (fixes #1259)
remove constant fields imports from migrations
* add migrations to update description and support fields to 1000 (fixes #1258)
* fix client/server account and video_channel description/support fields to be max len 1000 (fixes #1258);
fix test Should fail with a too long description;
fix test Should fail with a long description;
fix test Should fail with a long description;
Remove USER.SUPPORT from constants since that field no longer exists;
null not false, in migrations/0280-description-support.ts;
video support field 1000, oops;
* rename migration 0280-description-support.ts -> 0285-description-support.ts;
update video support maxlength text
Diffstat (limited to 'server/tests/api/check-params/video-channels.ts')
-rw-r--r-- | server/tests/api/check-params/video-channels.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index 3a7942945..e5696224d 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -118,12 +118,12 @@ describe('Test video channels API validator', function () { | |||
118 | }) | 118 | }) |
119 | 119 | ||
120 | it('Should fail with a long description', async function () { | 120 | it('Should fail with a long description', async function () { |
121 | const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(150) }) | 121 | const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(201) }) |
122 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 122 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
123 | }) | 123 | }) |
124 | 124 | ||
125 | it('Should fail with a long support text', async function () { | 125 | it('Should fail with a long support text', async function () { |
126 | const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(150) }) | 126 | const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(201) }) |
127 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 127 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
128 | }) | 128 | }) |
129 | 129 | ||
@@ -185,12 +185,12 @@ describe('Test video channels API validator', function () { | |||
185 | }) | 185 | }) |
186 | 186 | ||
187 | it('Should fail with a long description', async function () { | 187 | it('Should fail with a long description', async function () { |
188 | const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(150) }) | 188 | const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(201) }) |
189 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) | 189 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) |
190 | }) | 190 | }) |
191 | 191 | ||
192 | it('Should fail with a long support text', async function () { | 192 | it('Should fail with a long support text', async function () { |
193 | const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(150) }) | 193 | const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(201) }) |
194 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) | 194 | await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) |
195 | }) | 195 | }) |
196 | 196 | ||