0815cb35fb
Basic Lint Checks * basic
25 lines
534 B
Go
25 lines
534 B
Go
package job_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"queryorchestration/internal/database/repository"
|
|
"queryorchestration/internal/job"
|
|
"queryorchestration/internal/serviceconfig"
|
|
|
|
"github.com/pashagolub/pgxmock/v3"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestService(t *testing.T) {
|
|
pool, err := pgxmock.NewPool()
|
|
require.NoError(t, err)
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
cfg.DBPool = pool
|
|
cfg.DBQueries = repository.New(pool)
|
|
|
|
svc := job.New(cfg, &job.Services{})
|
|
assert.NotNil(t, svc)
|
|
}
|