+ it('Should unregister spyro-auth and do not login existing Spyro', async function () {
+ await updatePluginSettings({
+ url: server.url,
+ accessToken: server.accessToken,
+ npmName: 'peertube-plugin-test-id-pass-auth-one',
+ settings: { disableSpyro: true }
+ })
+
+ await userLogin(server, { username: 'spyro', password: 'spyro password' }, 400)
+ await userLogin(server, { username: 'spyro', password: 'fake' }, 400)
+ })
+
+ it('Should have disabled this auth', async function () {
+ const res = await getConfig(server.url)
+
+ const config: ServerConfig = res.body
+
+ const auths = config.plugin.registeredIdAndPassAuths
+ expect(auths).to.have.lengthOf(7)
+
+ const spyroAuth = auths.find(a => a.authName === 'spyro-auth')
+ expect(spyroAuth).to.not.exist
+ })
+