From fe3a55b071c99b346e9e9ab786f5d219e5a064cd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Jun 2018 20:34:37 +0200 Subject: Add video comments RSS --- server/tests/utils/feeds/feeds.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/tests/utils') 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 @@ import * as request from 'supertest' import { readFileBufferPromise } from '../../../helpers/core-utils' -function getXMLfeed (url: string, format?: string) { - const path = '/feeds/videos.xml' +type FeedType = 'videos' | 'video-comments' + +function getXMLfeed (url: string, feed: FeedType, format?: string) { + const path = '/feeds/' + feed + '.xml' return request(url) .get(path) @@ -12,8 +14,8 @@ function getXMLfeed (url: string, format?: string) { .expect('Content-Type', /xml/) } -function getJSONfeed (url: string) { - const path = '/feeds/videos.json' +function getJSONfeed (url: string, feed: FeedType) { + const path = '/feeds/' + feed + '.json' return request(url) .get(path) -- cgit v1.2.3