diff --git a/src/test/kotlin/feature/OpinionSteps.kt b/src/test/kotlin/feature/OpinionSteps.kt index 7ed9022..d94900f 100644 --- a/src/test/kotlin/feature/OpinionSteps.kt +++ b/src/test/kotlin/feature/OpinionSteps.kt @@ -60,7 +60,7 @@ class OpinionSteps : En, KoinTest { createdBy = get().findByUsername("$firstName-$lastName".toLowerCase().replace(' ', '-')) ?: error("Citizen not exist") ) - get().updateOpinions(opinion.choice, opinion.createdBy, opinion.target) + get().addOpinion(opinion) } private fun createOpinionOnArticle(extraInfo: DataTable? = null) { diff --git a/src/test/kotlin/feature/WorkgroupSteps.kt b/src/test/kotlin/feature/WorkgroupSteps.kt index 5ca64e0..d734d44 100644 --- a/src/test/kotlin/feature/WorkgroupSteps.kt +++ b/src/test/kotlin/feature/WorkgroupSteps.kt @@ -59,7 +59,11 @@ class WorkgroupSteps : En, KoinTest { } Then("The workgroup {string} exists") { id: String -> - Assert.assertNotNull(get().findById(id.toUUID())) + Assert.assertNotNull(get().findById(id.toUUID())) + } + + Then("The workgroup {string} not exists") { id: String -> + Assert.assertNull(get().findById(id.toUUID())) } } } \ No newline at end of file diff --git a/src/test/resources/feature/opinion.feature b/src/test/resources/feature/opinion.feature index d3a59f5..070a290 100644 --- a/src/test/resources/feature/opinion.feature +++ b/src/test/resources/feature/opinion.feature @@ -28,7 +28,9 @@ Feature: Opinion When I send a PUT request to "/articles/9226c1a3-8091-c3fa-7d0d-c2e98c9bee7b/opinions" with body: """ { - "opinion_choice": "0f4f1721-3136-44f1-9f31-1459f3317b15" + "ids": [ + "0f4f1721-3136-44f1-9f31-1459f3317b15" + ] } """ Then the response status code should be 201 diff --git a/src/test/resources/feature/workgroup.feature b/src/test/resources/feature/workgroup.feature index d5e2955..9eeaf70 100644 --- a/src/test/resources/feature/workgroup.feature +++ b/src/test/resources/feature/workgroup.feature @@ -39,7 +39,7 @@ Feature: Workgroup | id | ab469134-bf14-4856-b093-ae1aa990f977 | When I send a DELETE request to "/workgroups/ab469134-bf14-4856-b093-ae1aa990f977" Then the response status code should be 204 - And The workgroup "ab469134-bf14-4856-b093-ae1aa990f977" exists + And The workgroup "ab469134-bf14-4856-b093-ae1aa990f977" not exists Scenario: Can get workgroups list Given I have citizen Max Planck @@ -68,7 +68,7 @@ Feature: Workgroup {"id":"b5bac515-45d4-4aeb-9b6d-2627a0bbc419"} ] """ - Then the response status code should be 200 + Then the response status code should be 201 Scenario: Can remove member to workgroup Given I have citizen Heinrich Hertz