X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=server%2Ftests%2Fapi%2Fserver%2Fconfig.ts;h=b2f1933d10baa5429c8fec51f10147d36b75e50b;hb=8424c4026afd7304880a4ce8138a04ffb3d8c938;hp=78fdc9cc09479faa98919e8cb3ad7b13c3881d5b;hpb=7cd4d2ba10106c10602c86f74f55743ded588896;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 78fdc9cc0..b2f1933d1 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -68,6 +68,10 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { expect(data.followers.instance.enabled).to.be.true expect(data.followers.instance.manualApproval).to.be.false + + expect(data.followings.instance.autoFollowBack.enabled).to.be.false + expect(data.followings.instance.autoFollowIndex.enabled).to.be.false + expect(data.followings.instance.autoFollowIndex.indexUrl).to.equal('https://instances.joinpeertube.org') } function checkUpdatedConfig (data: CustomConfig) { @@ -119,6 +123,10 @@ function checkUpdatedConfig (data: CustomConfig) { expect(data.followers.instance.enabled).to.be.false expect(data.followers.instance.manualApproval).to.be.true + + expect(data.followings.instance.autoFollowBack.enabled).to.be.true + expect(data.followings.instance.autoFollowIndex.enabled).to.be.true + expect(data.followings.instance.autoFollowIndex.indexUrl).to.equal('https://updated.example.com') } describe('Test config', function () { @@ -261,6 +269,17 @@ describe('Test config', function () { enabled: false, manualApproval: true } + }, + followings: { + instance: { + autoFollowBack: { + enabled: true + }, + autoFollowIndex: { + enabled: true, + indexUrl: 'https://updated.example.com' + } + } } } await updateCustomConfig(server.url, server.accessToken, newCustomConfig)