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

Function TestParseMutationError

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

Source from the content-addressed store, hash-verified

1948}
1949
1950func TestParseMutationError(t *testing.T) {
1951 query := `
1952 mutation {
1953 set {
1954 <name> <is> <something> .
1955 <hometown> <is> <san/francisco> .
1956 }
1957 delete {
1958 <name> <is> <something-else> .
1959 }
1960 }
1961 `
1962 _, err := ParseMutation(query)
1963 require.Error(t, err)
1964 require.Contains(t, err.Error(), `Unexpected token: [mutation]`)
1965}
1966
1967func TestParseMutationError2(t *testing.T) {
1968 query := `

Callers

nothing calls this directly

Calls 2

ParseMutationFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected