(t *testing.T)
| 256 | } |
| 257 | |
| 258 | func TestClientCurrentBranchReturnsCurrentBranch(t *testing.T) { |
| 259 | // Given a repository checked out on a branch containing non-breaking spaces |
| 260 | repo := newTestRepo(t) |
| 261 | branchName := "branch\u00A0with\u00A0non\u00A0breaking\u00A0space" |
| 262 | repo.run(t, "checkout", "--quiet", "-b", branchName) |
| 263 | |
| 264 | // When the current branch is requested |
| 265 | branch, err := repo.client.CurrentBranch(t.Context()) |
| 266 | |
| 267 | // Then the complete branch name is returned |
| 268 | require.NoError(t, err) |
| 269 | assert.Equal(t, branchName, branch) |
| 270 | } |
| 271 | |
| 272 | func TestClientCurrentBranchReportsDetachedHead(t *testing.T) { |
| 273 | // Given a repository with a detached HEAD |
nothing calls this directly
no test coverage detected