- const res = await getFollowingListPaginationAndSort({ url, start, count, sort, search, state: 'accepted', actorType: 'Person' })
- expect(res.body.total).to.equal(0)
- expect(res.body.data).to.have.lengthOf(0)
+ const search = ':' + servers[1].port
+
+ {
+ const body = await servers[0].follows.getFollowings({ start, count, sort, search })
+ expect(body.total).to.equal(1)
+
+ const follows = body.data
+ expect(follows).to.have.lengthOf(1)
+ expect(follows[0].following.host).to.equal(servers[1].host)
+ }
+
+ {
+ const body = await servers[0].follows.getFollowings({ start, count, sort, search, state: 'accepted' })
+ expect(body.total).to.equal(1)
+ expect(body.data).to.have.lengthOf(1)
+ }
+
+ {
+ const body = await servers[0].follows.getFollowings({ start, count, sort, search, state: 'accepted', actorType: 'Person' })
+ expect(body.total).to.equal(1)
+ expect(body.data).to.have.lengthOf(1)
+ }
+
+ {
+ const body = await servers[0].follows.getFollowings({
+ start,
+ count,
+ sort,
+ search,
+ state: 'accepted',
+ actorType: 'Application'
+ })
+ expect(body.total).to.equal(0)
+ expect(body.data).to.have.lengthOf(0)
+ }
+
+ {
+ const body = await servers[0].follows.getFollowings({ start, count, sort, search, state: 'pending' })
+ expect(body.total).to.equal(0)
+ expect(body.data).to.have.lengthOf(0)
+ }