diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-30 15:06:06 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-30 15:06:36 +0100 |
commit | 1a8dd4da77468068d1ff7f7bd67f76399ae04e04 (patch) | |
tree | 430e92852055117af2a274ce7c6a92ee9f037f0a /server/tests/utils | |
parent | d7ea359d366f0caaf1efff2b727dd736c1301ddf (diff) | |
download | PeerTube-1a8dd4da77468068d1ff7f7bd67f76399ae04e04.tar.gz PeerTube-1a8dd4da77468068d1ff7f7bd67f76399ae04e04.tar.zst PeerTube-1a8dd4da77468068d1ff7f7bd67f76399ae04e04.zip |
Fix AP redirection
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/server/activitypub.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tests/utils/server/activitypub.ts b/server/tests/utils/server/activitypub.ts index cf3c1c3b3..eccb198ca 100644 --- a/server/tests/utils/server/activitypub.ts +++ b/server/tests/utils/server/activitypub.ts | |||
@@ -1,11 +1,10 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | 2 | ||
3 | function makeActivityPubGetRequest (url: string, path: string) { | 3 | function makeActivityPubGetRequest (url: string, path: string, expectedStatus = 200) { |
4 | return request(url) | 4 | return request(url) |
5 | .get(path) | 5 | .get(path) |
6 | .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8') | 6 | .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8') |
7 | .expect(200) | 7 | .expect(expectedStatus) |
8 | .expect('Content-Type', /json/) | ||
9 | } | 8 | } |
10 | 9 | ||
11 | // --------------------------------------------------------------------------- | 10 | // --------------------------------------------------------------------------- |