Skip to content

Instantly share code, notes, and snippets.

@lroslonek
Created August 17, 2017 18:03
static isPricePositive(dealId) {
def response
await().until({
response = is200(dealId)
})
response.price > 0
}
static is200(dealId) {
response = getDeal(dealId)
response.statusCode() == 404 ? false : response.path("")
}
static getDeal(dealId) {
def response =
when()
.get("deal/$dealId")
.then()
.extract().response()
response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment