diff options
| author | Carlos Martín Nieto <[email protected]> | 2015-06-05 02:02:37 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2015-06-08 04:07:49 +0200 |
| commit | 85fde1fcfbc3fd6000b8fa1a4041b4c314a92b2f (patch) | |
| tree | 80b29ec86120ba092fcd05c05e28e6a65d1f2b13 /status_test.go | |
| parent | 1011b03e4139580679bb93183a781edd11c22a97 (diff) | |
| parent | 53c158fbd7e5f4dac787f5c3a7107fcb4116f676 (diff) | |
Merge remote-tracking branch 'origin/master' into next
Diffstat (limited to 'status_test.go')
| -rw-r--r-- | status_test.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/status_test.go b/status_test.go index d18fca1..5b97b00 100644 --- a/status_test.go +++ b/status_test.go @@ -2,15 +2,13 @@ package git import ( "io/ioutil" - "os" "path" "testing" ) func TestStatusFile(t *testing.T) { repo := createTestRepo(t) - defer repo.Free() - defer os.RemoveAll(repo.Workdir()) + defer cleanupTestRepo(t, repo) state := repo.State() if state != RepositoryStateNone { @@ -30,10 +28,10 @@ func TestStatusFile(t *testing.T) { func TestStatusList(t *testing.T) { repo := createTestRepo(t) + defer cleanupTestRepo(t, repo) + // This commits the test repo README, so it doesn't show up in the status list and there's a head to compare to seedTestRepo(t, repo) - defer repo.Free() - defer os.RemoveAll(repo.Workdir()) err := ioutil.WriteFile(path.Join(path.Dir(repo.Workdir()), "hello.txt"), []byte("Hello, World"), 0644) checkFatal(t, err) |
