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

Method Test_GetUserByID

api/user_test.go:78–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (s *UserSuite) Test_GetUserByID() {
79 user := s.db.NewUser(2)
80
81 s.ctx.Params = gin.Params{{Key: "id", Value: "2"}}
82
83 s.a.GetUserByID(s.ctx)
84
85 assert.Equal(s.T(), 200, s.recorder.Code)
86 test.BodyEquals(s.T(), externalOf(user), s.recorder)
87}
88
89func (s *UserSuite) Test_GetUserByID_InvalidID() {
90 s.db.User(2)

Callers

nothing calls this directly

Calls 4

BodyEqualsFunction · 0.92
externalOfFunction · 0.85
NewUserMethod · 0.80
GetUserByIDMethod · 0.65

Tested by

no test coverage detected