()
| 419 | } |
| 420 | |
| 421 | func (s *PluginSuite) Test_GetConfig_incorrectUser_expectNotFound() { |
| 422 | conf, err := s.db.GetPluginConfByUserAndPath(1, mock.ModulePath) |
| 423 | assert.NoError(s.T(), err) |
| 424 | |
| 425 | { |
| 426 | test.WithUser(s.ctx, 2) |
| 427 | |
| 428 | s.ctx.Request = httptest.NewRequest("GET", fmt.Sprintf("/plugin/%d/config", conf.ID), nil) |
| 429 | s.ctx.Params = gin.Params{{Key: "id", Value: fmt.Sprint(conf.ID)}} |
| 430 | s.a.GetConfig(s.ctx) |
| 431 | |
| 432 | assert.Equal(s.T(), 404, s.recorder.Code) |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | func (s *PluginSuite) Test_GetConfig_danglingConf_expectNotFound() { |
| 437 | conf := s.getDanglingConf(1) |
nothing calls this directly
no test coverage detected