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

Method SetupTest

internal/models/factor_test.go:34–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (ts *FactorTestSuite) SetupTest() {
35 TruncateAll(ts.db)
36 user, err := NewUser("", "agenericemail@gmail.com", "secret", "test", nil)
37 require.NoError(ts.T(), err)
38 require.NoError(ts.T(), ts.db.Create(user))
39
40 factor := NewTOTPFactor(user, "asimplename")
41 require.NoError(ts.T(), factor.SetSecret("topsecret", false, "", ""))
42 require.NoError(ts.T(), ts.db.Create(factor))
43 ts.TestFactor = factor
44}
45
46func (ts *FactorTestSuite) TestFindFactorByFactorID() {
47 n, err := FindFactorByFactorID(ts.db, ts.TestFactor.ID)

Callers

nothing calls this directly

Calls 4

TruncateAllFunction · 0.85
NewUserFunction · 0.85
NewTOTPFactorFunction · 0.85
SetSecretMethod · 0.80

Tested by

no test coverage detected