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

Method Test_GetDisplay_danglingConf_expectNotFound

api/plugin_test.go:352–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350}
351
352func (s *PluginSuite) Test_GetDisplay_danglingConf_expectNotFound() {
353 conf := s.getDanglingConf(1)
354
355 {
356 test.WithUser(s.ctx, 1)
357
358 s.ctx.Request = httptest.NewRequest("GET", fmt.Sprintf("/plugin/%d/display", conf.ID), nil)
359 s.ctx.Params = gin.Params{{Key: "id", Value: fmt.Sprint(conf.ID)}}
360 s.a.GetDisplay(s.ctx)
361
362 assert.Equal(s.T(), 404, s.recorder.Code)
363 }
364}
365
366func (s *PluginSuite) Test_GetDisplay_nonExistPlugin_expectNotFound() {
367 {

Callers

nothing calls this directly

Calls 3

getDanglingConfMethod · 0.95
WithUserFunction · 0.92
GetDisplayMethod · 0.65

Tested by

no test coverage detected