(t *testing.T)
| 772 | } |
| 773 | |
| 774 | func TestClientRemotePushDefaultReturnsConfiguredRemote(t *testing.T) { |
| 775 | // Given a repository with a preferred push remote |
| 776 | repo := newTestRepo(t) |
| 777 | repo.run(t, "config", "remote.pushDefault", "origin") |
| 778 | |
| 779 | // When remote.pushDefault is read |
| 780 | remote, err := repo.client.RemotePushDefault(t.Context()) |
| 781 | |
| 782 | // Then the configured remote is returned |
| 783 | require.NoError(t, err) |
| 784 | assert.Equal(t, "origin", remote) |
| 785 | } |
| 786 | |
| 787 | func TestClientRemotePushDefaultPropagatesGitError(t *testing.T) { |
| 788 | // Given a client whose repository directory no longer exists |
nothing calls this directly
no test coverage detected