aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/feeds
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/feeds')
-rw-r--r--server/tests/utils/feeds/feeds.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/utils/feeds/feeds.ts b/server/tests/utils/feeds/feeds.ts
index fb480b704..af6df2b20 100644
--- a/server/tests/utils/feeds/feeds.ts
+++ b/server/tests/utils/feeds/feeds.ts
@@ -13,11 +13,12 @@ function getXMLfeed (url: string, feed: FeedType, format?: string) {
13 .expect('Content-Type', /xml/) 13 .expect('Content-Type', /xml/)
14} 14}
15 15
16function getJSONfeed (url: string, feed: FeedType) { 16function getJSONfeed (url: string, feed: FeedType, query: any = {}) {
17 const path = '/feeds/' + feed + '.json' 17 const path = '/feeds/' + feed + '.json'
18 18
19 return request(url) 19 return request(url)
20 .get(path) 20 .get(path)
21 .query(query)
21 .set('Accept', 'application/json') 22 .set('Accept', 'application/json')
22 .expect(200) 23 .expect(200)
23 .expect('Content-Type', /json/) 24 .expect('Content-Type', /json/)