diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:15:25 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:15:25 +0100 |
commit | 1b5b10d13152d704d2396a1e53d56aba1a8e7e03 (patch) | |
tree | 32e3dab1590cc909e2100fdc9aedd905cd7778f0 /server/tests | |
parent | 6cbdbdef1786aabb2003918fad6cd8c0d4433f7c (diff) | |
download | PeerTube-1b5b10d13152d704d2396a1e53d56aba1a8e7e03.tar.gz PeerTube-1b5b10d13152d704d2396a1e53d56aba1a8e7e03.tar.zst PeerTube-1b5b10d13152d704d2396a1e53d56aba1a8e7e03.zip |
Fix activitypub check headers
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/utils/activitypub.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/utils/activitypub.ts b/server/tests/utils/activitypub.ts new file mode 100644 index 000000000..cf3c1c3b3 --- /dev/null +++ b/server/tests/utils/activitypub.ts | |||
@@ -0,0 +1,15 @@ | |||
1 | import * as request from 'supertest' | ||
2 | |||
3 | function makeActivityPubGetRequest (url: string, path: string) { | ||
4 | return request(url) | ||
5 | .get(path) | ||
6 | .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8') | ||
7 | .expect(200) | ||
8 | .expect('Content-Type', /json/) | ||
9 | } | ||
10 | |||
11 | // --------------------------------------------------------------------------- | ||
12 | |||
13 | export { | ||
14 | makeActivityPubGetRequest | ||
15 | } | ||