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

Method TestRemoveUser_DisableFail_cannotRemove

plugin/manager_test.go:293–300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291}
292
293func (s *ManagerSuite) TestRemoveUser_DisableFail_cannotRemove() {
294 s.manager.initializeForUser(*s.db.NewUserWithName(8, "disable_fail_2"))
295 errExpected := errors.New("test error")
296 mock.ReturnErrorOnDisableForUser(8, errExpected)
297 s.manager.SetPluginEnabled(s.getConfForMockPlugin(8).ID, true)
298
299 assert.EqualError(s.T(), s.manager.RemoveUser(8), errExpected.Error())
300}
301
302func (s *ManagerSuite) TestRemoveUser_danglingConf_expectSuccess() {
303 // make a dangling conf for this instance

Callers

nothing calls this directly

Calls 7

getConfForMockPluginMethod · 0.95
initializeForUserMethod · 0.80
NewUserWithNameMethod · 0.80
SetPluginEnabledMethod · 0.80
RemoveUserMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected