aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorKimsible <kimsible@users.noreply.github.com>2021-04-28 18:26:26 +0200
committerKimsible <kimsible@users.noreply.github.com>2021-05-05 11:47:03 +0200
commit08ac081b37cd6115634e8951608116fe0f13032b (patch)
treeda5c1b338705686093c8fea26e552b16fda7c2cb /shared
parent1e37d32f4bdc51045cd85d01ea1035fd53e0d32c (diff)
downloadPeerTube-08ac081b37cd6115634e8951608116fe0f13032b.tar.gz
PeerTube-08ac081b37cd6115634e8951608116fe0f13032b.tar.zst
PeerTube-08ac081b37cd6115634e8951608116fe0f13032b.zip
Add test for API actors route
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/actors/actors.ts18
-rw-r--r--shared/extra-utils/index.ts1
2 files changed, 19 insertions, 0 deletions
diff --git a/shared/extra-utils/actors/actors.ts b/shared/extra-utils/actors/actors.ts
new file mode 100644
index 000000000..4a4aba775
--- /dev/null
+++ b/shared/extra-utils/actors/actors.ts
@@ -0,0 +1,18 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import { makeGetRequest } from '../requests/requests'
4import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
5
6function getActor (url: string, actorName: string, statusCodeExpected = HttpStatusCode.OK_200) {
7 const path = '/api/v1/actors/' + actorName
8
9 return makeGetRequest({
10 url,
11 path,
12 statusCodeExpected
13 })
14}
15
16export {
17 getActor
18}
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts
index 898a92d43..5c520d0c2 100644
--- a/shared/extra-utils/index.ts
+++ b/shared/extra-utils/index.ts
@@ -1,3 +1,4 @@
1export * from './actors/actors'
1export * from './bulk/bulk' 2export * from './bulk/bulk'
2export * from './cli/cli' 3export * from './cli/cli'
3export * from './feeds/feeds' 4export * from './feeds/feeds'