MCPcopy
hub / github.com/pocketbase/pocketbase / TestRemoveAll

Function TestRemoveAll

tools/store/store_test.go:83–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestRemoveAll(t *testing.T) {
84 s := store.New(map[string]bool{"test1": true, "test2": true})
85
86 keys := []string{"test1", "test2"}
87
88 s.RemoveAll()
89
90 for i, key := range keys {
91 if s.Has(key) {
92 t.Errorf("(%d) Expected %q to be removed", i, key)
93 }
94 }
95}
96
97func TestRemove(t *testing.T) {
98 s := store.New(map[string]bool{"test": true})

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
RemoveAllMethod · 0.45
HasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…