(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestRefUpdateDefault(t *testing.T) { |
| 10 | pushModes := []string{"simple", ""} |
| 11 | for _, pushMode := range pushModes { |
| 12 | env := newEnv(map[string][]string{ |
| 13 | "push.default": []string{pushMode}, |
| 14 | "branch.local.remote": []string{"ignore"}, |
| 15 | "branch.local.merge": []string{"me"}, |
| 16 | }) |
| 17 | |
| 18 | u := NewRefUpdate(env, "origin", ParseRef("refs/heads/local", ""), nil) |
| 19 | assert.Equal(t, "local", u.RemoteRef().Name, "pushmode=%q", pushMode) |
| 20 | assert.Equal(t, RefTypeLocalBranch, u.RemoteRef().Type, "pushmode=%q", pushMode) |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func TestRefUpdateTrackedDefault(t *testing.T) { |
| 25 | pushModes := []string{"simple", "upstream", "tracking", ""} |
nothing calls this directly
no test coverage detected