Lint
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package integration
|
||||
|
||||
import integration.steps.`when`.Validate
|
||||
import integration.steps.then.`And have property`
|
||||
import integration.steps.then.`And the response should not be null`
|
||||
import integration.steps.then.`Then the response should be`
|
||||
import integration.steps.`when`.`When I send a GET request`
|
||||
import integration.steps.`when`.`When I send a POST request`
|
||||
import integration.steps.`when`.`with body`
|
||||
import integration.steps.then.`whish contains`
|
||||
import integration.steps.then.and
|
||||
import integration.steps.given.`Given I have citizen`
|
||||
import integration.steps.given.`Given I have constitution`
|
||||
import integration.steps.given.`Given I have constitutions`
|
||||
import integration.steps.given.`authenticated as`
|
||||
import integration.steps.then.`And have property`
|
||||
import integration.steps.then.`And the response should not be null`
|
||||
import integration.steps.then.`Then the response should be`
|
||||
import integration.steps.then.`whish contains`
|
||||
import integration.steps.then.and
|
||||
import io.ktor.http.HttpStatusCode.Companion.BadRequest
|
||||
import io.ktor.http.HttpStatusCode.Companion.Created
|
||||
import io.ktor.http.HttpStatusCode.Companion.OK
|
||||
@@ -66,18 +66,20 @@ class `Constitution routes` : BaseTest() {
|
||||
`Given I have citizen`("Henri", "Poincaré")
|
||||
`When I send a POST request`("/constitutions") {
|
||||
`authenticated as`("Henri", "Poincaré")
|
||||
`with body`("""
|
||||
{
|
||||
"versionId":"15814bb6-8d90-4c6a-a456-c3939a8ec75e",
|
||||
"title":"Hello world!",
|
||||
"anonymous":true,
|
||||
"titles":[
|
||||
{
|
||||
"name":"plop"
|
||||
}
|
||||
]
|
||||
}
|
||||
""")
|
||||
`with body`(
|
||||
"""
|
||||
{
|
||||
"versionId":"15814bb6-8d90-4c6a-a456-c3939a8ec75e",
|
||||
"title":"Hello world!",
|
||||
"anonymous":true,
|
||||
"titles":[
|
||||
{
|
||||
"name":"plop"
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
)
|
||||
} `Then the response should be` Created and {
|
||||
`And the response should not be null`()
|
||||
`And have property`("$.versionId") `whish contains` "15814bb6-8d90-4c6a-a456-c3939a8ec75e"
|
||||
@@ -92,19 +94,21 @@ class `Constitution routes` : BaseTest() {
|
||||
`Given I have citizen`("Henri", "Poincaré")
|
||||
`When I send a POST request`("/constitutions", Validate.ALL - Validate.REQUEST_BODY) {
|
||||
`authenticated as`("Henri", "Poincaré")
|
||||
`with body`("""
|
||||
{
|
||||
"versionId":"15814bb6-8d90-4c6a-a456-c3939a8ec75e",
|
||||
"title":"Hello world!",
|
||||
"anonymous":true,
|
||||
"titles":[
|
||||
{
|
||||
"name":"plop",
|
||||
"wrongField":0
|
||||
}
|
||||
]
|
||||
}
|
||||
""")
|
||||
`with body`(
|
||||
"""
|
||||
{
|
||||
"versionId":"15814bb6-8d90-4c6a-a456-c3939a8ec75e",
|
||||
"title":"Hello world!",
|
||||
"anonymous":true,
|
||||
"titles":[
|
||||
{
|
||||
"name":"plop",
|
||||
"wrongField":0
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
)
|
||||
} `Then the response should be` BadRequest
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user