diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-08 20:34:37 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-08 20:34:37 +0200 |
commit | fe3a55b071c99b346e9e9ab786f5d219e5a064cd (patch) | |
tree | 55c6d0e9a253b20df738fd82820eb931044828e6 /server/tests/utils | |
parent | 4a7591e1a8ec5ffdff85580c6be4b18d8b85b4d4 (diff) | |
download | PeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.tar.gz PeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.tar.zst PeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.zip |
Add video comments RSS
Diffstat (limited to 'server/tests/utils')
-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) |