Created
June 7, 2013 06:41
-
-
Save sebastienblanc/5727443 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
given: "Application My App is about to be registered......" | |
def json = new JsonBuilder() | |
def request = testSpec.getRequestSpecification() | |
.contentType("application/json") | |
.header("Accept", "application/json") | |
.body(json { | |
name "MyApp" | |
description "awesome app" | |
} | |
) | |
when: "Application is registered" | |
def response = testSpec.getRequestSpecification().given().spec(request).post(root.toString() + "rest/applications") | |
//response.body().prettyPrint() | |
then: "Response code 200 is returned" | |
response.body().jsonPath().get("name") != null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment