From fe953fc967757d1a2f1841a2461e748fd988571d Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Wed, 24 Mar 2021 19:48:14 +0100 Subject: [PATCH] lintCheck after test --- build.gradle.kts | 1 + src/test/kotlin/integration/Workgroup routes.kt | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2e05421..a49c495 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -191,6 +191,7 @@ tasks.test { useJUnitPlatform() systemProperty("junit.jupiter.execution.parallel.enabled", true) dependsOn(testSql) + finalizedBy(tasks.ktlintCheck) finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run } diff --git a/src/test/kotlin/integration/Workgroup routes.kt b/src/test/kotlin/integration/Workgroup routes.kt index 5f6131e..0df0a7f 100644 --- a/src/test/kotlin/integration/Workgroup routes.kt +++ b/src/test/kotlin/integration/Workgroup routes.kt @@ -11,12 +11,12 @@ import integration.steps.given.`Given I have workgroup` import integration.steps.given.`With members` import integration.steps.given.`authenticated as` import integration.steps.given.`with no content` +import integration.steps.then.`And have property` import integration.steps.then.`And the response should be null` import integration.steps.then.`And the response should contain list` import integration.steps.then.`And the response should contain` import integration.steps.then.`Then the response should be` import integration.steps.then.and -import integration.steps.then.`And have property` import io.ktor.http.HttpStatusCode.Companion.Created import io.ktor.http.HttpStatusCode.Companion.NoContent import io.ktor.http.HttpStatusCode.Companion.NotFound @@ -105,12 +105,14 @@ class `Workgroup routes` : BaseTest() { } `When I send a PUT request`("/workgroups/aa875a24-0050-4252-9130-d37391714e26") { `authenticated as`("John", "Wheeler") - `with body`(""" - { - "name":"La ratatouille", - "description":"Une petite souris" - } - """) + `with body`( + """ + { + "name":"La ratatouille", + "description":"Une petite souris" + } + """ + ) } `Then the response should be` OK and { `And the response should contain`("$.id", "aa875a24-0050-4252-9130-d37391714e26") `And the response should contain`("$.name", "La ratatouille")