- const res = await getMyUserInformation(server.url, server.accessToken)
- expect((res.body as User).theme).to.equal('instance-default')
+ const user = await server.users.getMyInfo()
+ expect(user.theme).to.equal('instance-default')
+ })
+
+ it('Should not install a broken plugin', async function () {
+ this.timeout(60000)
+
+ async function check () {
+ const body = await command.list({ pluginType: PluginType.PLUGIN })
+ const plugins = body.data
+ expect(plugins.find(p => p.name === 'test-broken')).to.not.exist
+ }
+
+ await command.install({
+ path: PluginsCommand.getPluginTestPath('-broken'),
+ expectedStatus: HttpStatusCode.BAD_REQUEST_400
+ })
+
+ await check()
+
+ await killallServers([ server ])
+ await server.run()
+
+ await check()