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

Method Test_getToken

auth/util_test.go:35–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35func (s *UtilSuite) Test_getToken() {
36 ctx, _ := gin.CreateTestContext(httptest.NewRecorder())
37 RegisterAuthentication(ctx, nil, 1, "asdasda")
38 actualID := GetTokenID(ctx)
39 assert.Equal(s.T(), "asdasda", actualID)
40}
41
42func (s *UtilSuite) expectUserIDWith(user *model.User, tokenUserID, expectedID uint) {
43 ctx, _ := gin.CreateTestContext(httptest.NewRecorder())

Callers

nothing calls this directly

Calls 2

RegisterAuthenticationFunction · 0.85
GetTokenIDFunction · 0.85

Tested by

no test coverage detected