reintroduced legacy Branches view: added /branches endpoint for listing origin branches and their latest builds (or unknown for never-built branches), updated UI with reload button and navigation, and enhanced API and tests
This commit is contained in:
@@ -101,6 +101,18 @@ class GitServiceTest : FunSpec() {
|
||||
service.originBranches(fixture.work) shouldContainExactly listOf("main")
|
||||
}
|
||||
|
||||
test("originBranchHeads maps every origin branch to its head commit, without HEAD") {
|
||||
val fixture = Fixture()
|
||||
fixture.pushNewSeedBranch("feature/x")
|
||||
service.fetchOrigin(fixture.work)
|
||||
|
||||
val heads = service.originBranchHeads(fixture.work)
|
||||
|
||||
heads.keys shouldBe setOf("feature/x", "main")
|
||||
heads["main"] shouldBe fixture.git(fixture.work, "rev-parse", "refs/remotes/origin/main").stdout.trim()
|
||||
heads["feature/x"] shouldBe fixture.git(fixture.work, "rev-parse", "refs/remotes/origin/feature/x").stdout.trim()
|
||||
}
|
||||
|
||||
test("fetchOrigin picks up new origin branches and prunes deleted ones") {
|
||||
val fixture = Fixture()
|
||||
fixture.pushNewSeedBranch("feature/x")
|
||||
|
||||
Reference in New Issue
Block a user