diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-24 11:04:02 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d (patch) | |
tree | 1b2f8a578b2d35138ac326d65674a9c9d740e8c9 /server/tests/utils/search | |
parent | aa55a4da422330fe2816f1764b64f6607a0ca4aa (diff) | |
download | PeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.tar.gz PeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.tar.zst PeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.zip |
Search video channel handle/uri
Diffstat (limited to 'server/tests/utils/search')
-rw-r--r-- | server/tests/utils/search/video-channels.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/tests/utils/search/video-channels.ts b/server/tests/utils/search/video-channels.ts new file mode 100644 index 000000000..0532134ae --- /dev/null +++ b/server/tests/utils/search/video-channels.ts | |||
@@ -0,0 +1,22 @@ | |||
1 | import { makeGetRequest } from '../requests/requests' | ||
2 | |||
3 | function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) { | ||
4 | const path = '/api/v1/search/video-channels' | ||
5 | |||
6 | return makeGetRequest({ | ||
7 | url, | ||
8 | path, | ||
9 | query: { | ||
10 | sort: '-createdAt', | ||
11 | search | ||
12 | }, | ||
13 | token, | ||
14 | statusCodeExpected | ||
15 | }) | ||
16 | } | ||
17 | |||
18 | // --------------------------------------------------------------------------- | ||
19 | |||
20 | export { | ||
21 | searchVideoChannel | ||
22 | } | ||