Fix rebased main path tests
This commit is contained in:
+18
-4
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user