secret-santa/internal/handlers/user_handler_test.go
2024-11-24 11:29:35 +01:00

20 lines
554 B
Go

package handlers_test
import (
"context"
"git.katuwoss.dev/JustScreaMy/secret-santa/internal/testhelpers"
_ "github.com/jackc/pgx/v5/stdlib"
"github.com/stretchr/testify/assert"
"testing"
)
// TODO: After having ability to configure database connection
func TestHandleGetUsers(t *testing.T) {
ctx := context.Background()
database, err := testhelpers.CreatePostgresContainer(ctx)
t.Log(database.ConnectionString)
assert.NoError(t, err)
err = testhelpers.MigrateDatabase("pgx", "postgres", database.ConnectionString)
assert.NoError(t, err)
}