Fix cucumber tests

This commit is contained in:
2020-05-12 12:04:18 +02:00
parent 5008b8b69f
commit 5db451ef0e
4 changed files with 11 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ class OpinionSteps : En, KoinTest {
createdBy = get<CitizenRepository>().findByUsername("$firstName-$lastName".toLowerCase().replace(' ', '-'))
?: error("Citizen not exist")
)
get<OpinionRepository>().updateOpinions(opinion.choice, opinion.createdBy, opinion.target)
get<OpinionRepository>().addOpinion(opinion)
}
private fun createOpinionOnArticle(extraInfo: DataTable? = null) {

View File

@@ -59,7 +59,11 @@ class WorkgroupSteps : En, KoinTest {
}
Then("The workgroup {string} exists") { id: String ->
Assert.assertNotNull(get<CitizenRepository>().findById(id.toUUID()))
Assert.assertNotNull(get<WorkgroupRepository>().findById(id.toUUID()))
}
Then("The workgroup {string} not exists") { id: String ->
Assert.assertNull(get<WorkgroupRepository>().findById(id.toUUID()))
}
}
}