(t *testing.T)
| 200 | } |
| 201 | |
| 202 | func TestClientUpdateRemoteURLUpdatesConfiguredRemote(t *testing.T) { |
| 203 | // Given a repository with a local remote |
| 204 | repo := newTestRepo(t) |
| 205 | original := newBareTestRepo(t) |
| 206 | replacement := newBareTestRepo(t) |
| 207 | repo.run(t, "remote", "add", "test", original.fileURL()) |
| 208 | |
| 209 | // When the remote URL is updated |
| 210 | err := repo.client.UpdateRemoteURL(t.Context(), "test", replacement.fileURL()) |
| 211 | |
| 212 | // Then Git stores the replacement URL |
| 213 | require.NoError(t, err) |
| 214 | assert.Equal(t, replacement.fileURL(), repo.run(t, "remote", "get-url", "test")) |
| 215 | } |
| 216 | |
| 217 | func TestClientUpdateRemoteURLReportsMissingRemote(t *testing.T) { |
| 218 | // Given a repository without the named remote |
nothing calls this directly
no test coverage detected