(t *testing.T)
| 1015 | } |
| 1016 | |
| 1017 | func TestClientCheckoutBranchReportsMissingBranch(t *testing.T) { |
| 1018 | // Given a repository without the requested branch |
| 1019 | repo := newTestRepo(t) |
| 1020 | |
| 1021 | // When the missing branch is checked out |
| 1022 | err := repo.client.CheckoutBranch(t.Context(), "missing") |
| 1023 | |
| 1024 | // Then Git's checkout error is returned |
| 1025 | require.Error(t, err) |
| 1026 | var gitError *GitError |
| 1027 | require.ErrorAs(t, err, &gitError) |
| 1028 | assert.NotZero(t, gitError.ExitCode) |
| 1029 | } |
| 1030 | |
| 1031 | func TestClientCheckoutNewBranchTracksRemoteBranch(t *testing.T) { |
| 1032 | // Given a repository with an origin feature tracking ref |
nothing calls this directly
no test coverage detected