aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-30 13:15:25 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-30 13:15:25 +0100
commit1b5b10d13152d704d2396a1e53d56aba1a8e7e03 (patch)
tree32e3dab1590cc909e2100fdc9aedd905cd7778f0 /server/tests
parent6cbdbdef1786aabb2003918fad6cd8c0d4433f7c (diff)
downloadPeerTube-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.ts15
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 @@
1import * as request from 'supertest'
2
3function 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
13export {
14 makeActivityPubGetRequest
15}