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

Method Test_DeleteUserByID

api/user_test.go:139–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137}
138
139func (s *UserSuite) Test_DeleteUserByID() {
140 assert.False(s.T(), s.notifiedDelete)
141
142 s.db.User(2)
143
144 s.ctx.Params = gin.Params{{Key: "id", Value: "2"}}
145
146 s.a.DeleteUserByID(s.ctx)
147
148 assert.Equal(s.T(), 200, s.recorder.Code)
149 s.db.AssertUserNotExist(2)
150 assert.True(s.T(), s.notifiedDelete)
151}
152
153func (s *UserSuite) Test_DeleteUserByID_NotifyFail() {
154 s.db.User(5)

Callers

nothing calls this directly

Calls 3

UserMethod · 0.80
AssertUserNotExistMethod · 0.80
DeleteUserByIDMethod · 0.65

Tested by

no test coverage detected