From 8424c4026afd7304880a4ce8138a04ffb3d8c938 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Aug 2019 16:50:12 +0200 Subject: Add auto follow back support for instances --- server/tests/api/check-params/config.ts | 23 ++++++++++++++++++++-- .../tests/api/check-params/user-notifications.ts | 3 ++- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 7773ae1e7..1221735c5 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts @@ -5,8 +5,16 @@ import 'mocha' import { CustomConfig } from '../../../../shared/models/server/custom-config.model' import { - createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, flushAndRunServer, ServerInfo, - setAccessTokensToServers, userLogin, immutableAssign, cleanupTests + cleanupTests, + createUser, + flushAndRunServer, + immutableAssign, + makeDeleteRequest, + makeGetRequest, + makePutBodyRequest, + ServerInfo, + setAccessTokensToServers, + userLogin } from '../../../../shared/extra-utils' describe('Test config API validators', function () { @@ -98,6 +106,17 @@ describe('Test config API validators', function () { enabled: false, manualApproval: true } + }, + followings: { + instance: { + autoFollowBack: { + enabled: true + }, + autoFollowIndex: { + enabled: true, + indexUrl: 'https://index.example.com' + } + } } } diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 14ee20d45..3b06be7ef 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts @@ -172,7 +172,8 @@ describe('Test user notifications API validators', function () { commentMention: UserNotificationSettingValue.WEB, newFollow: UserNotificationSettingValue.WEB, newUserRegistration: UserNotificationSettingValue.WEB, - newInstanceFollower: UserNotificationSettingValue.WEB + newInstanceFollower: UserNotificationSettingValue.WEB, + autoInstanceFollowing: UserNotificationSettingValue.WEB } it('Should fail with missing fields', async function () { -- cgit v1.2.3