20 lines
554 B
Go
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)
|
|
}
|