mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-29 18:07:54 +00:00
tests: add tests for user controller
This commit is contained in:
@@ -431,18 +431,12 @@ func TestOIDCController(t *testing.T) {
|
||||
app := bootstrap.NewBootstrapApp(config.Config{})
|
||||
|
||||
db, err := app.SetupDatabase("/tmp/tinyauth_test.db")
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to set up database: %v", err)
|
||||
}
|
||||
assert.NoError(t, err)
|
||||
|
||||
queries := repository.New(db)
|
||||
oidcService := service.NewOIDCService(oidcServiceCfg, queries)
|
||||
err = oidcService.Init()
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to initialize OIDC service: %v", err)
|
||||
}
|
||||
assert.NoError(t, err)
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.description, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user