(t *testing.T, target string)
| 50 | } |
| 51 | |
| 52 | func checkProject(t *testing.T, target string) { |
| 53 | // check that project directory was created |
| 54 | checkPath(t, target, true) |
| 55 | |
| 56 | // check .gitignore |
| 57 | ignorePath := filepath.Join(target, ".gitignore") |
| 58 | checkPath(t, ignorePath, false) |
| 59 | |
| 60 | // check git directory |
| 61 | gitDir := filepath.Join(target, GitDirectory) |
| 62 | checkPath(t, gitDir, true) |
| 63 | repo, err := git.OpenRepository(gitDir) |
| 64 | assert.NoError(t, err) |
| 65 | |
| 66 | assert.True(t, filepath.Clean(repo.Path()) == gitDir) |
| 67 | } |
| 68 | |
| 69 | // checkPath determines if a path has been created. |
| 70 | // The test errors if it doesn't exist or doesn't match dir. |
no test coverage detected