diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 16:38:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 16:38:50 +0100 |
commit | 265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (patch) | |
tree | c7c52d1ae48a35b8f9aa06a9fa2335a6ba502fd1 /server/tests/utils/users/accounts.ts | |
parent | 9bce811268cd74b402176ae9fcd8b77ac887576e (diff) | |
download | PeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.tar.gz PeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.tar.zst PeerTube-265ba139ebf56bbdc1c65f6ea4f367774c691fc0.zip |
Send account activitypub update events
Diffstat (limited to 'server/tests/utils/users/accounts.ts')
-rw-r--r-- | server/tests/utils/users/accounts.ts | 29 |
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 @@ | |||
1 | import { makeGetRequest } from '../requests/requests' | ||
2 | |||
3 | function 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 | |||
14 | function 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 | |||
26 | export { | ||
27 | getAccount, | ||
28 | getAccountsList | ||
29 | } | ||