aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/feeds/feeds.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-08 20:34:37 +0200
committerChocobozzz <me@florianbigard.com>2018-06-08 20:34:37 +0200
commitfe3a55b071c99b346e9e9ab786f5d219e5a064cd (patch)
tree55c6d0e9a253b20df738fd82820eb931044828e6 /server/tests/utils/feeds/feeds.ts
parent4a7591e1a8ec5ffdff85580c6be4b18d8b85b4d4 (diff)
downloadPeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.tar.gz
PeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.tar.zst
PeerTube-fe3a55b071c99b346e9e9ab786f5d219e5a064cd.zip
Add video comments RSS
Diffstat (limited to 'server/tests/utils/feeds/feeds.ts')
-rw-r--r--server/tests/utils/feeds/feeds.ts10
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 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { readFileBufferPromise } from '../../../helpers/core-utils' 2import { readFileBufferPromise } from '../../../helpers/core-utils'
3 3
4function getXMLfeed (url: string, format?: string) { 4type FeedType = 'videos' | 'video-comments'
5 const path = '/feeds/videos.xml' 5
6function 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
15function getJSONfeed (url: string) { 17function 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)