diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverControllerSchemaValidationIntegrationTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverControllerSchemaValidationIntegrationTests.groovy index 016b63cb7..d26b90cb5 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverControllerSchemaValidationIntegrationTests.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverControllerSchemaValidationIntegrationTests.groovy @@ -124,6 +124,25 @@ class MetadataResolverControllerSchemaValidationIntegrationTests extends Specifi } + def 'POST for FilesystemMetadataResolver with invalid payload according to schema validation'() { + given: + def postedJsonBody = """ + { + "name" : null, + "xmlId": "123", + "metadataFile": "%{shib.home}/metadata.xml", + "@type" : "FilesystemMetadataResolver" + } + """ + + when: + def result = HTTP_POST(postedJsonBody) + + then: + checkJsonValidationIsPerformed(result) + + } + private static HttpEntity createRequestHttpEntityFor(String jsonBody) { new HttpEntity(jsonBody, ['Content-Type': 'application/json'] as HttpHeaders) }