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

Method expectTryUserIDWith

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

Source from the content-addressed store, hash-verified

47}
48
49func (s *UtilSuite) expectTryUserIDWith(user *model.User, tokenUserID uint, expectedID *uint) {
50 ctx, _ := gin.CreateTestContext(httptest.NewRecorder())
51 RegisterAuthentication(ctx, user, tokenUserID, "")
52 actualID := TryGetUserID(ctx)
53 assert.Equal(s.T(), expectedID, actualID)
54}

Callers 1

Test_getIDMethod · 0.95

Calls 2

RegisterAuthenticationFunction · 0.85
TryGetUserIDFunction · 0.85

Tested by

no test coverage detected