From e1416b558eb1d86dac3809e5a4703bfc4f30ad69 Mon Sep 17 00:00:00 2001 From: Enrico Date: Fri, 28 Feb 2020 01:16:00 +0100 Subject: [PATCH] Remove duplicate fields test --- .../validation/ValidationSchemaSpec.scala | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/core/src/test/scala/caliban/validation/ValidationSchemaSpec.scala b/core/src/test/scala/caliban/validation/ValidationSchemaSpec.scala index 9bdd3f332..dffbf5711 100644 --- a/core/src/test/scala/caliban/validation/ValidationSchemaSpec.scala +++ b/core/src/test/scala/caliban/validation/ValidationSchemaSpec.scala @@ -17,31 +17,7 @@ object ValidationSchemaSpec assertM(gql.interpreter.run, fails[ValidationError](hasField("msg", _.msg, equalTo(expectedMessage)))) suite("ValidationSchemaSpec")({ - def checkInputObject( - __type: __Type, - expectedMessage: String - ) = { - val validate = Validator.validateSchema(RootType(__Type(kind = SCALAR), Some(__type), None)) - assertM(validate.run, fails[ValidationError](hasField("msg", _.msg, equalTo(expectedMessage)))) - } - - def inputValue(name: String, t: __Type): __InputValue = - __InputValue(name = name, `type` = () => t, description = None, defaultValue = None) - - def inputObject(inputs: __InputValue*): __Type = - __Type( - name = Some("inputObject"), - kind = INPUT_OBJECT, - inputFields = Some(inputs.toList) - ) - suite("InputObjects")( - testM("any input field must have a unique name within an Input Object") { - checkInputObject( - inputObject(inputValue("duplicate", __Type(SCALAR)), inputValue("duplicate", __Type(SCALAR))), - "InputObject has repeated fields: duplicate" - ) - }, testM("name can't start with '__'") { check( graphQL(resolverWrongMutationUnderscore),