aides-repo-api/tests/integration/taskservice_create_test.go
Maxim Slipenko e4f9743dea
Some checks failed
Format and Lint / format-check (push) Failing after 2s
Format and Lint / test (push) Successful in 52s
chore: change code.alt-gnome to code.aides.space
2025-01-07 17:54:16 +03:00

26 lines
581 B
Go

package integration
import (
"testing"
"github.com/stretchr/testify/assert"
"code.aides.space/aides-infra/aides-repo-api/internal/models"
"code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice"
)
func TestTaskService_Create(t *testing.T) {
db := prepareDb(t)
config := prepareConfig()
service := taskservice.New(db, config)
repoName := "example-foo"
task, err := service.Create(repoName)
assert.NoError(t, err)
assert.Equal(t, uint(1), task.ID)
assert.Equal(t, repoName, task.Repo.Name)
assert.Equal(t, models.StatusPending, task.Status)
}