diff options
Diffstat (limited to 'server/tests/utils/feeds/feeds.ts')
-rw-r--r-- | server/tests/utils/feeds/feeds.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/tests/utils/feeds/feeds.ts b/server/tests/utils/feeds/feeds.ts index 20e68cf3d..ffd23a1ad 100644 --- a/server/tests/utils/feeds/feeds.ts +++ b/server/tests/utils/feeds/feeds.ts | |||
@@ -1,8 +1,10 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { readFileBufferPromise } from '../../../helpers/core-utils' | 2 | import { readFileBufferPromise } from '../../../helpers/core-utils' |
3 | 3 | ||
4 | function getXMLfeed (url: string, format?: string) { | 4 | type FeedType = 'videos' | 'video-comments' |
5 | const path = '/feeds/videos.xml' | 5 | |
6 | function getXMLfeed (url: string, feed: FeedType, format?: string) { | ||
7 | const path = '/feeds/' + feed + '.xml' | ||
6 | 8 | ||
7 | return request(url) | 9 | return request(url) |
8 | .get(path) | 10 | .get(path) |
@@ -12,8 +14,8 @@ function getXMLfeed (url: string, format?: string) { | |||
12 | .expect('Content-Type', /xml/) | 14 | .expect('Content-Type', /xml/) |
13 | } | 15 | } |
14 | 16 | ||
15 | function getJSONfeed (url: string) { | 17 | function getJSONfeed (url: string, feed: FeedType) { |
16 | const path = '/feeds/videos.json' | 18 | const path = '/feeds/' + feed + '.json' |
17 | 19 | ||
18 | return request(url) | 20 | return request(url) |
19 | .get(path) | 21 | .get(path) |