2017-11-30 06:15:25 -06:00
|
|
|
import * as request from 'supertest'
|
2020-12-08 14:16:10 -06:00
|
|
|
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
|
2017-11-30 06:15:25 -06:00
|
|
|
|
2020-12-08 14:16:10 -06:00
|
|
|
function makeActivityPubGetRequest (url: string, path: string, expectedStatus = HttpStatusCode.OK_200) {
|
2017-11-30 06:15:25 -06:00
|
|
|
return request(url)
|
|
|
|
.get(path)
|
|
|
|
.set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8')
|
2018-11-30 08:06:06 -06:00
|
|
|
.expect(expectedStatus)
|
2017-11-30 06:15:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
|
|
|
makeActivityPubGetRequest
|
|
|
|
}
|