createUser,
generateUserAccessToken,
getVideoIdFromUUID,
- immutableAssign,
MockInstancesIndex,
MockSmtpServer,
prepareNotificationsTest,
await checkUserRegistered(baseParams, 'user_45', 'presence')
const userOverride = { socketNotifications: userNotifications, token: userAccessToken, check: { web: true, mail: false } }
- await checkUserRegistered(immutableAssign(baseParams, userOverride), 'user_45', 'absence')
+ await checkUserRegistered({ ...baseParams, ...userOverride }, 'user_45', 'absence')
})
})
await checkNewInstanceFollower(baseParams, 'localhost:' + servers[2].port, 'presence')
const userOverride = { socketNotifications: userNotifications, token: userAccessToken, check: { web: true, mail: false } }
- await checkNewInstanceFollower(immutableAssign(baseParams, userOverride), 'localhost:' + servers[2].port, 'absence')
+ await checkNewInstanceFollower({ ...baseParams, ...userOverride }, 'localhost:' + servers[2].port, 'absence')
})
it('Should send a notification on auto follow back', async function () {
await checkAutoInstanceFollowing(baseParams, followerHost, followingHost, 'presence')
const userOverride = { socketNotifications: userNotifications, token: userAccessToken, check: { web: true, mail: false } }
- await checkAutoInstanceFollowing(immutableAssign(baseParams, userOverride), followerHost, followingHost, 'absence')
+ await checkAutoInstanceFollowing({ ...baseParams, ...userOverride }, followerHost, followingHost, 'absence')
config.followings.instance.autoFollowBack.enabled = false
await servers[0].configCommand.updateCustomSubConfig({ newConfig: config })
currentCustomConfig = await servers[0].configCommand.getCustomConfig()
- const autoBlacklistTestsCustomConfig = immutableAssign(currentCustomConfig, {
+ const autoBlacklistTestsCustomConfig = {
+ ...currentCustomConfig,
+
autoBlacklist: {
videos: {
ofUsers: {
}
}
}
- })
+ }
// enable transcoding otherwise own publish notification after transcoding not expected
autoBlacklistTestsCustomConfig.transcoding.enabled = true