Skip to content
quarry Artifact [4b6585b023]
Login

Artifact [4b6585b023]

Artifact 4b6585b0231f9587c7648b3a39cfedd77094f9bdcfcd74ccd3834036838150d8:


package api

import (
	"testing"

	"craftdesign.group/quarry/internal/zitcli"
)

// One check-in on both sides is the index mid-fold, never landed work:
// alreadyLanded answers false without asking the store (a check-in
// "merges up-to-date" into itself).
func TestAlreadyLandedRefusesASelfProbe(t *testing.T) {
	repo := &Repo{Zit: zitcli.New(t.TempDir())}
	if alreadyLanded(repo, "abc123", "abc123") {
		t.Error("FAIL: a tip probed against itself read as already landed")
	}
}