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

Method TestSetPluginEnabled

plugin/manager_test.go:244–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242}
243
244func (s *ManagerSuite) TestSetPluginEnabled() {
245 pid := s.getConfForMockPlugin(1).ID
246 assert.Nil(s.T(), s.manager.SetPluginEnabled(pid, true))
247 assert.Error(s.T(), s.manager.SetPluginEnabled(pid, true))
248 assert.Nil(s.T(), s.manager.SetPluginEnabled(pid, false))
249}
250
251func (s *ManagerSuite) TestSetPluginEnabled_EnableReturnsError_cannotEnable() {
252 s.db.NewUserWithName(5, "enable_fail")

Callers

nothing calls this directly

Calls 3

getConfForMockPluginMethod · 0.95
SetPluginEnabledMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected