MCPcopy Create free account
hub / github.com/daodst/chat / TestLookupMapPathInvalid

Function TestLookupMapPathInvalid

internal/pushrules/util_test.go:119–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

117}
118
119func TestLookupMapPathInvalid(t *testing.T) {
120 tsts := []struct {
121 Path []string
122 Root map[string]interface{}
123 }{
124 {nil, nil},
125 {[]string{"a"}, nil},
126 {[]string{"a", "b"}, map[string]interface{}{"a": "c"}},
127 }
128 for _, tst := range tsts {
129 t.Run(fmt.Sprint(tst.Path), func(t *testing.T) {
130 got, err := lookupMapPath(tst.Path, tst.Root)
131 if err == nil {
132 t.Fatalf("lookupMapPath succeeded with %#v, but want failure", got)
133 }
134 })
135 }
136}
137
138func TestParseRoomMemberCountCondition(t *testing.T) {
139 tsts := []struct {

Callers

nothing calls this directly

Calls 2

lookupMapPathFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected