(t *testing.T)
| 37 | } |
| 38 | |
| 39 | func TestRefUpdateCurrentDefault(t *testing.T) { |
| 40 | env := newEnv(map[string][]string{ |
| 41 | "push.default": []string{"current"}, |
| 42 | "branch.local.remote": []string{"origin"}, |
| 43 | "branch.local.merge": []string{"tracked"}, |
| 44 | }) |
| 45 | |
| 46 | u := NewRefUpdate(env, "origin", ParseRef("refs/heads/local", ""), nil) |
| 47 | assert.Equal(t, "local", u.RemoteRef().Name) |
| 48 | assert.Equal(t, RefTypeLocalBranch, u.RemoteRef().Type) |
| 49 | } |
| 50 | |
| 51 | func TestRefUpdateExplicitLocalAndRemoteRefs(t *testing.T) { |
| 52 | u := NewRefUpdate(nil, "", ParseRef("refs/heads/local", "abc123"), ParseRef("refs/heads/remote", "def456")) |
nothing calls this directly
no test coverage detected