Fix rebased main path tests

This commit is contained in:
Joe Julian
2026-03-29 13:38:47 -07:00
parent ed1e2c3e6b
commit 508fe7abc1
+18 -4
View File
@@ -953,13 +953,27 @@ func TestUIEditingEntryPathMovesEntryBetweenGroups(t *testing.T) {
}
u.state.SelectedEntryID = "vault-console"
u.state.SelectedEntryID = "vault-console"
item, ok := u.selectedEntry()
model, err := u.state.Session.Current()
if err != nil {
t.Fatalf("state.Session.Current() error = %v", err)
}
var (
item vault.Entry
ok bool
)
for _, candidate := range model.Entries {
if candidate.ID == "vault-console" {
item = candidate
ok = true
break
}
}
if !ok {
t.Fatal("selectedEntry() ok = false, want moved entry")
t.Fatal("model.Entries contains vault-console = false, want moved entry")
}
if !slices.Equal(item.Path, []string{"Root", "Infrastructure"}) {
t.Fatalf("selectedEntry().Path = %v, want [Root Infrastructure]", item.Path)
t.Fatalf("model.Entries vault-console Path = %v, want [Root Infrastructure]", item.Path)
}
}