aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 16:38:50 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 16:38:50 +0100
commit265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (patch)
treec7c52d1ae48a35b8f9aa06a9fa2335a6ba502fd1 /server/tests/utils
parent9bce811268cd74b402176ae9fcd8b77ac887576e (diff)
downloadPeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.tar.gz
PeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.tar.zst
PeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.zip
Send account activitypub update events
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/users/accounts.ts29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/tests/utils/users/accounts.ts b/server/tests/utils/users/accounts.ts
new file mode 100644
index 000000000..71712100e
--- /dev/null
+++ b/server/tests/utils/users/accounts.ts
@@ -0,0 +1,29 @@
1import { makeGetRequest } from '../requests/requests'
2
3function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) {
4 const path = '/api/v1/accounts'
5
6 return makeGetRequest({
7 url,
8 query: { sort },
9 path,
10 statusCodeExpected
11 })
12}
13
14function getAccount (url: string, accountId: number | string, statusCodeExpected = 200) {
15 const path = '/api/v1/accounts/' + accountId
16
17 return makeGetRequest({
18 url,
19 path,
20 statusCodeExpected
21 })
22}
23
24// ---------------------------------------------------------------------------
25
26export {
27 getAccount,
28 getAccountsList
29}