26 lines
493 B
Go
26 lines
493 B
Go
package document_test
|
|
|
|
import (
|
|
"context"
|
|
"queryorchestration/internal/database/repository"
|
|
"queryorchestration/internal/query"
|
|
"testing"
|
|
|
|
"github.com/pashagolub/pgxmock/v3"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestService(t *testing.T) {
|
|
ctx := context.Background()
|
|
|
|
db, err := pgxmock.NewConn()
|
|
if err != nil {
|
|
t.Fatalf("failed to open pgxmock database: %v", err)
|
|
}
|
|
defer db.Close(ctx)
|
|
|
|
queries := repository.New(db)
|
|
svc := query.New(queries)
|
|
assert.NotNil(t, svc)
|
|
}
|