-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
cleanupTests,
createUser,
flushAndRunServer,
- makeDeleteRequest,
+ makeDeleteRequest, makeGetRequest,
makePostBodyRequest,
ServerInfo,
setAccessTokensToServers,
it('Should fail with an incorrect sort', async function () {
await checkBadSortPagination(server.url, path)
})
+
+ it('Should fail with an incorrect state', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ query: {
+ state: 'blabla'
+ }
+ })
+ })
+
+ it('Should fail with an incorrect actor type', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ query: {
+ actorType: 'blabla'
+ }
+ })
+ })
+
+ it('Should fail succeed with the correct params', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ statusCodeExpected: 200,
+ query: {
+ state: 'accepted',
+ actorType: 'Application'
+ }
+ })
+ })
})
describe('When listing followers', function () {
it('Should fail with an incorrect sort', async function () {
await checkBadSortPagination(server.url, path)
})
+
+ it('Should fail with an incorrect actor type', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ query: {
+ actorType: 'blabla'
+ }
+ })
+ })
+
+ it('Should fail with an incorrect state', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ query: {
+ state: 'blabla',
+ actorType: 'Application'
+ }
+ })
+ })
+
+ it('Should fail succeed with the correct params', async function () {
+ await makeGetRequest({
+ url: server.url,
+ path,
+ statusCodeExpected: 200,
+ query: {
+ state: 'accepted'
+ }
+ })
+ })
})
describe('When removing a follower', function () {