MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestSearchStateHasActiveVMFilter

Function TestSearchStateHasActiveVMFilter

internal/ui/models/state_test.go:86–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestSearchStateHasActiveVMFilter(t *testing.T) {
87 if (&SearchState{}).HasActiveVMFilter() {
88 t.Fatal("expected empty search state to be inactive")
89 }
90
91 if !(&SearchState{Filter: "abc"}).HasActiveVMFilter() {
92 t.Fatal("expected text filter to be active")
93 }
94
95 if !(&SearchState{VMFilters: VMFilterOptions{Node: "node-a"}}).HasActiveVMFilter() {
96 t.Fatal("expected advanced filters to be active")
97 }
98}

Callers

nothing calls this directly

Calls 1

HasActiveVMFilterMethod · 0.80

Tested by

no test coverage detected