(t *testing.T)
| 1146 | } |
| 1147 | |
| 1148 | func TestClientUnsetRemoteResolutionRemovesResolution(t *testing.T) { |
| 1149 | // Given a repository with a resolved remote |
| 1150 | repo := newTestRepo(t) |
| 1151 | repo.run(t, "remote", "add", "origin", "https://github.com/cli/cli.git") |
| 1152 | repo.run(t, "config", "remote.origin.gh-resolved", "base") |
| 1153 | |
| 1154 | // When the remote resolution is unset |
| 1155 | err := repo.client.UnsetRemoteResolution(t.Context(), "origin") |
| 1156 | |
| 1157 | // Then the remote no longer has a resolution |
| 1158 | require.NoError(t, err) |
| 1159 | remotes, err := repo.client.Remotes(t.Context()) |
| 1160 | require.NoError(t, err) |
| 1161 | require.Len(t, remotes, 1) |
| 1162 | assert.Empty(t, remotes[0].Resolved) |
| 1163 | } |
| 1164 | |
| 1165 | func TestClientUnsetRemoteResolutionPropagatesGitError(t *testing.T) { |
| 1166 | // Given a client whose repository directory does not exist |
nothing calls this directly
no test coverage detected