()
| 448 | } |
| 449 | |
| 450 | func (s *PluginSuite) Test_GetConfig_nonExistPlugin_expectNotFound() { |
| 451 | { |
| 452 | test.WithUser(s.ctx, 1) |
| 453 | |
| 454 | s.ctx.Request = httptest.NewRequest("GET", "/plugin/99/config", nil) |
| 455 | s.ctx.Params = gin.Params{{Key: "id", Value: "99"}} |
| 456 | s.a.GetConfig(s.ctx) |
| 457 | |
| 458 | assert.Equal(s.T(), 404, s.recorder.Code) |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | func (s *PluginSuite) Test_UpdateConfig() { |
| 463 | conf, err := s.db.GetPluginConfByUserAndPath(1, mock.ModulePath) |