Skip to content

Commit

Permalink
Test for filesystem resolver validation
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Aug 23, 2019
1 parent ffffc0b commit 0d48d4c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> createRequestHttpEntityFor(String jsonBody) {
new HttpEntity<String>(jsonBody, ['Content-Type': 'application/json'] as HttpHeaders)
}
Expand Down

0 comments on commit 0d48d4c

Please sign in to comment.