(t *testing.T)
| 946 | } |
| 947 | |
| 948 | func TestClientDeleteLocalBranchRemovesUnmergedBranch(t *testing.T) { |
| 949 | // Given a feature branch with a commit that is not merged into trunk |
| 950 | repo := newTestRepo(t) |
| 951 | repo.run(t, "commit", "--quiet", "--allow-empty", "-m", "initial commit") |
| 952 | repo.run(t, "checkout", "--quiet", "-b", "feature") |
| 953 | repo.run(t, "commit", "--quiet", "--allow-empty", "-m", "unmerged feature work") |
| 954 | repo.run(t, "checkout", "--quiet", "trunk") |
| 955 | |
| 956 | // When the branch is deleted |
| 957 | err := repo.client.DeleteLocalBranch(t.Context(), "feature") |
| 958 | |
| 959 | // Then the branch no longer exists |
| 960 | require.NoError(t, err) |
| 961 | assert.False(t, repo.client.HasLocalBranch(t.Context(), "feature"), "deleted branch should not resolve") |
| 962 | } |
| 963 | |
| 964 | func TestClientDeleteLocalBranchReportsCheckedOutBranch(t *testing.T) { |
| 965 | // Given a repository whose trunk branch is checked out |
nothing calls this directly
no test coverage detected