MCPcopy
hub / github.com/dgraph-io/dgraph / TestVarInAggError

Function TestVarInAggError

query/query0_test.go:2085–2104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2083}
2084
2085func TestVarInAggError(t *testing.T) {
2086
2087 query := `
2088 {
2089 var(func: uid( 1)) {
2090 friend {
2091 a as age
2092 }
2093 }
2094
2095 # var not allowed in min filter
2096 me(func: min(val(a))) {
2097 name
2098 }
2099 }
2100 `
2101 _, err := dql.Parse(dql.Request{Str: query})
2102 require.Error(t, err)
2103 require.Contains(t, err.Error(), "Function name: min is not valid.")
2104}
2105
2106func TestVarInIneqError(t *testing.T) {
2107

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected