(t *testing.T)
| 242 | } |
| 243 | |
| 244 | func TestClientSetRemoteResolutionPropagatesGitError(t *testing.T) { |
| 245 | // Given a client whose repository directory does not exist |
| 246 | client := Client{RepoDir: filepath.Join(t.TempDir(), "missing")} |
| 247 | |
| 248 | // When a remote resolution is set |
| 249 | err := client.SetRemoteResolution(t.Context(), "origin", "base") |
| 250 | |
| 251 | // Then the Git error is returned |
| 252 | require.Error(t, err) |
| 253 | var gitErr *GitError |
| 254 | require.ErrorAs(t, err, &gitErr) |
| 255 | assert.NotZero(t, gitErr.ExitCode) |
| 256 | } |
| 257 | |
| 258 | func TestClientCurrentBranchReturnsCurrentBranch(t *testing.T) { |
| 259 | // Given a repository checked out on a branch containing non-breaking spaces |
nothing calls this directly
no test coverage detected