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

Method expectUserIDWith

auth/util_test.go:42–47  ·  view source on GitHub ↗
(user *model.User, tokenUserID, expectedID uint)

Source from the content-addressed store, hash-verified

40}
41
42func (s *UtilSuite) expectUserIDWith(user *model.User, tokenUserID, expectedID uint) {
43 ctx, _ := gin.CreateTestContext(httptest.NewRecorder())
44 RegisterAuthentication(ctx, user, tokenUserID, "")
45 actualID := GetUserID(ctx)
46 assert.Equal(s.T(), expectedID, actualID)
47}
48
49func (s *UtilSuite) expectTryUserIDWith(user *model.User, tokenUserID uint, expectedID *uint) {
50 ctx, _ := gin.CreateTestContext(httptest.NewRecorder())

Callers 1

Test_getIDMethod · 0.95

Calls 2

RegisterAuthenticationFunction · 0.85
GetUserIDFunction · 0.85

Tested by

no test coverage detected