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

Function TestGenerateNotExistingToken

auth/token_test.go:22–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestGenerateNotExistingToken(t *testing.T) {
23 count := 5
24 token := GenerateNotExistingToken(func() string {
25 return fmt.Sprint(count)
26 }, func(token string) bool {
27 count--
28 return token != "0"
29 })
30 assert.Equal(t, "0", token)
31}
32
33func TestBadCryptoReaderPanics(t *testing.T) {
34 assert.Panics(t, func() {

Callers

nothing calls this directly

Calls 1

GenerateNotExistingTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…