diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-23 17:58:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9 (patch) | |
tree | 2050443febcdb2a3eec68b7bbf9687e26dcb24dc /server/tests/api/users | |
parent | 240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e (diff) | |
download | PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.tar.gz PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.tar.zst PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.zip |
Add ability to search video channels
Diffstat (limited to 'server/tests/api/users')
-rw-r--r-- | server/tests/api/users/user-subscriptions.ts | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts index cb7d94b0b..65b80540c 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | listUserSubscriptions, | 12 | listUserSubscriptions, |
13 | listUserSubscriptionVideos, | 13 | listUserSubscriptionVideos, |
14 | removeUserSubscription, | 14 | removeUserSubscription, |
15 | getUserSubscription | 15 | getUserSubscription, areSubscriptionsExist |
16 | } from '../../utils/users/user-subscriptions' | 16 | } from '../../utils/users/user-subscriptions' |
17 | 17 | ||
18 | const expect = chai.expect | 18 | const expect = chai.expect |
@@ -128,6 +128,23 @@ describe('Test users subscriptions', function () { | |||
128 | } | 128 | } |
129 | }) | 129 | }) |
130 | 130 | ||
131 | it('Should return the existing subscriptions', async function () { | ||
132 | const uris = [ | ||
133 | 'user3_channel@localhost:9003', | ||
134 | 'root2_channel@localhost:9001', | ||
135 | 'root_channel@localhost:9001', | ||
136 | 'user3_channel@localhost:9001' | ||
137 | ] | ||
138 | |||
139 | const res = await areSubscriptionsExist(servers[ 0 ].url, users[ 0 ].accessToken, uris) | ||
140 | const body = res.body | ||
141 | |||
142 | expect(body['user3_channel@localhost:9003']).to.be.true | ||
143 | expect(body['root2_channel@localhost:9001']).to.be.false | ||
144 | expect(body['root_channel@localhost:9001']).to.be.true | ||
145 | expect(body['user3_channel@localhost:9001']).to.be.false | ||
146 | }) | ||
147 | |||
131 | it('Should list subscription videos', async function () { | 148 | it('Should list subscription videos', async function () { |
132 | { | 149 | { |
133 | const res = await listUserSubscriptionVideos(servers[0].url, servers[0].accessToken) | 150 | const res = await listUserSubscriptionVideos(servers[0].url, servers[0].accessToken) |