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

Method Test_CreateUser_NoPassword

api/user_test.go:289–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287}
288
289func (s *UserSuite) Test_CreateUser_NoPassword() {
290 s.loginAdmin()
291
292 s.ctx.Request = httptest.NewRequest("POST", "/user", strings.NewReader(`{"name": "tom", "pass": "", "admin": true}`))
293 s.ctx.Request.Header.Set("Content-Type", "application/json")
294
295 s.a.CreateUser(s.ctx)
296
297 assert.Equal(s.T(), 400, s.recorder.Code)
298}
299
300func (s *UserSuite) Test_CreateUser_NoName() {
301 s.loginAdmin()

Callers

nothing calls this directly

Calls 2

loginAdminMethod · 0.95
CreateUserMethod · 0.65

Tested by

no test coverage detected