(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestNewRepository(t *testing.T) { |
| 9 | wd, err := os.Getwd() |
| 10 | if err != nil { |
| 11 | t.Fatal(err) |
| 12 | } |
| 13 | |
| 14 | repo, err := NewRepository(wd) |
| 15 | if err != nil { |
| 16 | t.Skip("Not in a git repository, skipping test") |
| 17 | } |
| 18 | |
| 19 | if repo.GitDir() == "" { |
| 20 | t.Error("GitDir() should not be empty") |
| 21 | } |
| 22 | |
| 23 | if repo.WorkTree() == "" { |
| 24 | t.Error("WorkTree() should not be empty") |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func TestGetConfigBool(t *testing.T) { |
| 29 | wd, err := os.Getwd() |
nothing calls this directly
no test coverage detected