MCPcopy Create free account
hub / github.com/supabase/auth / TestFindUserByRecoveryToken

Method TestFindUserByRecoveryToken

internal/models/user_test.go:143–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143func (ts *UserTestSuite) TestFindUserByRecoveryToken() {
144 u := ts.createUser()
145 tokenHash := "test_recovery_token"
146 require.NoError(ts.T(), CreateOneTimeToken(ts.db, u.ID, "relates_to not used", tokenHash, RecoveryToken))
147
148 n, err := FindUserByRecoveryToken(ts.db, tokenHash)
149 require.NoError(ts.T(), err)
150 require.Equal(ts.T(), u.ID, n.ID)
151}
152
153func (ts *UserTestSuite) TestFindUserWithRefreshToken() {
154 u := ts.createUser()

Callers

nothing calls this directly

Calls 4

createUserMethod · 0.95
CreateOneTimeTokenFunction · 0.85
FindUserByRecoveryTokenFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected