diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-15 14:46:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-15 15:29:07 +0100 |
commit | 2422c46b27790d94fd29a7092170cee5a1b56008 (patch) | |
tree | d5c1942ce20cadb27a551d87c789edfe92f5b105 /server/tests/utils/videos/video-channels.ts | |
parent | 34cbef8c6cc912143a421413bdd832c4adcc556a (diff) | |
download | PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.gz PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.zst PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.zip |
Implement support field in video and video channel
Diffstat (limited to 'server/tests/utils/videos/video-channels.ts')
-rw-r--r-- | server/tests/utils/videos/video-channels.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index 062ca8f4d..2d095d8ab 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts | |||
@@ -3,6 +3,7 @@ import * as request from 'supertest' | |||
3 | type VideoChannelAttributes = { | 3 | type VideoChannelAttributes = { |
4 | name?: string | 4 | name?: string |
5 | description?: string | 5 | description?: string |
6 | support?: string | ||
6 | } | 7 | } |
7 | 8 | ||
8 | function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { | 9 | function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { |
@@ -30,13 +31,14 @@ function getAccountVideoChannelsList (url: string, accountId: number | string, s | |||
30 | .expect('Content-Type', /json/) | 31 | .expect('Content-Type', /json/) |
31 | } | 32 | } |
32 | 33 | ||
33 | function addVideoChannel (url: string, token: string, videoChannelAttributesArg: VideoChannelAttributes, expectedStatus = 204) { | 34 | function addVideoChannel (url: string, token: string, videoChannelAttributesArg: VideoChannelAttributes, expectedStatus = 200) { |
34 | const path = '/api/v1/videos/channels' | 35 | const path = '/api/v1/videos/channels' |
35 | 36 | ||
36 | // Default attributes | 37 | // Default attributes |
37 | let attributes = { | 38 | let attributes = { |
38 | name: 'my super video channel', | 39 | name: 'my super video channel', |
39 | description: 'my super channel description' | 40 | description: 'my super channel description', |
41 | support: 'my super channel support' | ||
40 | } | 42 | } |
41 | attributes = Object.assign(attributes, videoChannelAttributesArg) | 43 | attributes = Object.assign(attributes, videoChannelAttributesArg) |
42 | 44 | ||
@@ -54,6 +56,7 @@ function updateVideoChannel (url: string, token: string, channelId: number, attr | |||
54 | 56 | ||
55 | if (attributes.name) body['name'] = attributes.name | 57 | if (attributes.name) body['name'] = attributes.name |
56 | if (attributes.description) body['description'] = attributes.description | 58 | if (attributes.description) body['description'] = attributes.description |
59 | if (attributes.support) body['support'] = attributes.support | ||
57 | 60 | ||
58 | return request(url) | 61 | return request(url) |
59 | .put(path) | 62 | .put(path) |