Skip to content

Commit

Permalink
Test that trunk branches are always options (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattprecious authored Feb 25, 2025
1 parent c3df765 commit 13c7140
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,26 @@ class BranchTrackTest {
)
}
}

@Test
fun trunkIsAlwaysIncluded() = withTestEnvironment {
gitInit()
val mainSha = gitCommit("Empty")
gitCreateAndCheckoutBranch("change-a")
gitCommit("Change A")
gitCheckoutBranch("main")
gitCommit("Main update")
gitCreateAndCheckoutBranch("green-main")
testCommand({ repoInit("main", Optional.Some("green-main")) })

testCommand({ branchTrack("change-a") }) {
awaitFrame(
"""
|Choose a parent branch for change-a:$s
|❯ ○ green-main $s
| ○ main $s
""".trimMargin(),
)
}
}
}

0 comments on commit 13c7140

Please sign in to comment.