TestRepositoryCreate tests creating a new environment
(t *testing.T)
| 14 | |
| 15 | // TestRepositoryCreate tests creating a new environment |
| 16 | func TestRepositoryCreate(t *testing.T) { |
| 17 | t.Parallel() |
| 18 | WithRepository(t, "repository-create", SetupEmptyRepo, func(t *testing.T, repo *repository.Repository, user *UserActions) { |
| 19 | // Create an environment |
| 20 | env := user.CreateEnvironment("Test Create", "Testing repository create") |
| 21 | |
| 22 | // Verify environment was created properly |
| 23 | assert.NotNil(t, env) |
| 24 | assert.NotEmpty(t, env.ID) |
| 25 | assert.Equal(t, "Test Create", env.State.Title) |
| 26 | worktreePath := user.WorktreePath(env.ID) |
| 27 | assert.NotEmpty(t, worktreePath) |
| 28 | |
| 29 | // Verify worktree was created |
| 30 | _, err := os.Stat(worktreePath) |
| 31 | assert.NoError(t, err) |
| 32 | }) |
| 33 | } |
| 34 | |
| 35 | // TestRepositoryGet tests retrieving an existing environment |
| 36 | func TestRepositoryGet(t *testing.T) { |
nothing calls this directly
no test coverage detected