MCPcopy
hub / github.com/gotify/server / Test_GetConfig_danglingConf_expectNotFound

Method Test_GetConfig_danglingConf_expectNotFound

api/plugin_test.go:436–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434}
435
436func (s *PluginSuite) Test_GetConfig_danglingConf_expectNotFound() {
437 conf := s.getDanglingConf(1)
438
439 {
440 test.WithUser(s.ctx, 1)
441
442 s.ctx.Request = httptest.NewRequest("GET", fmt.Sprintf("/plugin/%d/config", conf.ID), nil)
443 s.ctx.Params = gin.Params{{Key: "id", Value: fmt.Sprint(conf.ID)}}
444 s.a.GetConfig(s.ctx)
445
446 assert.Equal(s.T(), 404, s.recorder.Code)
447 }
448}
449
450func (s *PluginSuite) Test_GetConfig_nonExistPlugin_expectNotFound() {
451 {

Callers

nothing calls this directly

Calls 3

getDanglingConfMethod · 0.95
WithUserFunction · 0.92
GetConfigMethod · 0.80

Tested by

no test coverage detected