aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/feeds/feeds.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/feeds/feeds.ts')
-rw-r--r--server/tests/feeds/feeds.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index 92a468192..f1055ea44 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -31,6 +31,7 @@ import {
31import { waitJobs } from '../../../shared/extra-utils/server/jobs' 31import { waitJobs } from '../../../shared/extra-utils/server/jobs'
32import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' 32import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
33import { User } from '../../../shared/models/users' 33import { User } from '../../../shared/models/users'
34import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
34 35
35chai.use(require('chai-xml')) 36chai.use(require('chai-xml'))
36chai.use(require('chai-json-schema')) 37chai.use(require('chai-json-schema'))
@@ -330,11 +331,16 @@ describe('Test syndication feeds', () => {
330 }) 331 })
331 332
332 it('Should fail with an invalid token', async function () { 333 it('Should fail with an invalid token', async function () {
333 await getJSONfeed(servers[0].url, 'subscriptions', { accountId: feeduserAccountId, token: 'toto' }, 403) 334 await getJSONfeed(servers[0].url, 'subscriptions', { accountId: feeduserAccountId, token: 'toto' }, HttpStatusCode.FORBIDDEN_403)
334 }) 335 })
335 336
336 it('Should fail with a token of another user', async function () { 337 it('Should fail with a token of another user', async function () {
337 await getJSONfeed(servers[0].url, 'subscriptions', { accountId: feeduserAccountId, token: userFeedToken }, 403) 338 await getJSONfeed(
339 servers[0].url,
340 'subscriptions',
341 { accountId: feeduserAccountId, token: userFeedToken },
342 HttpStatusCode.FORBIDDEN_403
343 )
338 }) 344 })
339 345
340 it('Should list no videos for a user with videos but no subscriptions', async function () { 346 it('Should list no videos for a user with videos but no subscriptions', async function () {
@@ -382,7 +388,12 @@ describe('Test syndication feeds', () => {
382 it('Should renew the token, and so have an invalid old token', async function () { 388 it('Should renew the token, and so have an invalid old token', async function () {
383 await renewUserScopedTokens(servers[0].url, userAccessToken) 389 await renewUserScopedTokens(servers[0].url, userAccessToken)
384 390
385 await getJSONfeed(servers[0].url, 'subscriptions', { accountId: userAccountId, token: userFeedToken, version: 3 }, 403) 391 await getJSONfeed(
392 servers[0].url,
393 'subscriptions',
394 { accountId: userAccountId, token: userFeedToken, version: 3 },
395 HttpStatusCode.FORBIDDEN_403
396 )
386 }) 397 })
387 398
388 it('Should succeed with the new token', async function () { 399 it('Should succeed with the new token', async function () {