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

Method SetupTest

internal/api/user_test.go:45–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (ts *UserTestSuite) SetupTest() {
46 models.TruncateAll(ts.API.db)
47
48 // Create user
49 u, err := models.NewUser("123456789", "test@example.com", "password", ts.Config.JWT.Aud, nil)
50 require.NoError(ts.T(), err, "Error creating test user model")
51 require.NoError(ts.T(), ts.API.db.Create(u), "Error saving new test user")
52}
53
54func (ts *UserTestSuite) generateToken(user *models.User, sessionId *uuid.UUID) string {
55 req := httptest.NewRequest(http.MethodPost, "/token?grant_type=password", nil)

Callers

nothing calls this directly

Calls 2

TruncateAllFunction · 0.92
NewUserFunction · 0.92

Tested by

no test coverage detected