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

Method Test_GetUserByID_UnknownUser

api/user_test.go:98–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98func (s *UserSuite) Test_GetUserByID_UnknownUser() {
99 s.db.User(2)
100
101 s.ctx.Params = gin.Params{{Key: "id", Value: "3"}}
102
103 s.a.GetUserByID(s.ctx)
104
105 assert.Equal(s.T(), 404, s.recorder.Code)
106}
107
108func (s *UserSuite) Test_DeleteUserByID_LastAdmin_Expect400() {
109 s.db.CreateUser(&model.User{

Callers

nothing calls this directly

Calls 2

UserMethod · 0.80
GetUserByIDMethod · 0.65

Tested by

no test coverage detected