MCPcopy
hub / github.com/pquerna/otp / TestKeyWithNewLine

Function TestKeyWithNewLine

otp_test.go:51–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestKeyWithNewLine(t *testing.T) {
52 w, err := NewKeyFromURL(`otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP
53`)
54 require.NoError(t, err)
55 sec := w.Secret()
56 require.Equal(t, "JBSWY3DPEHPK3PXP", sec)
57}

Callers

nothing calls this directly

Calls 2

NewKeyFromURLFunction · 0.85
SecretMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…