(t *testing.T)
| 1948 | } |
| 1949 | |
| 1950 | func 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 | |
| 1967 | func TestParseMutationError2(t *testing.T) { |
| 1968 | query := ` |
nothing calls this directly
no test coverage detected