MCPcopy Index your code
hub / github.com/gotify/server / Test_CreateUser_NoName

Method Test_CreateUser_NoName

api/user_test.go:300–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298}
299
300func (s *UserSuite) Test_CreateUser_NoName() {
301 s.loginAdmin()
302
303 s.ctx.Request = httptest.NewRequest("POST", "/user", strings.NewReader(`{"name": "", "pass": "asd", "admin": true}`))
304 s.ctx.Request.Header.Set("Content-Type", "application/json")
305
306 s.a.CreateUser(s.ctx)
307
308 assert.Equal(s.T(), 400, s.recorder.Code)
309}
310
311func (s *UserSuite) Test_CreateUser_NameAlreadyExists() {
312 s.loginAdmin()

Callers

nothing calls this directly

Calls 2

loginAdminMethod · 0.95
CreateUserMethod · 0.65

Tested by

no test coverage detected