diff options
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 | } | ||