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

Function TestParseMutationError2

dql/parser_test.go:1967–1980  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1965}
1966
1967func TestParseMutationError2(t *testing.T) {
1968 query := `
1969 set {
1970 <name> <is> <something> .
1971 <hometown> <is> <san/francisco> .
1972 }
1973 delete {
1974 <name> <is> <something-else> .
1975 }
1976 `
1977 _, err := ParseMutation(query)
1978 require.Error(t, err)
1979 require.Contains(t, err.Error(), `Invalid operation type: set`)
1980}
1981
1982func TestParseMutationAndQueryWithComments(t *testing.T) {
1983 query := `

Callers

nothing calls this directly

Calls 2

ParseMutationFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected