Fix tests

This commit is contained in:
2021-03-15 10:13:01 +01:00
parent 189aa8d549
commit 869093ab25
2 changed files with 3 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ class `Constitution routes` : BaseTest() {
`authenticated as`("Henri", "Poincaré") `authenticated as`("Henri", "Poincaré")
`with body`(""" `with body`("""
{ {
"version_id":"15814bb6-8d90-4c6a-a456-c3939a8ec75e", "versionId":"15814bb6-8d90-4c6a-a456-c3939a8ec75e",
"title":"Hello world!", "title":"Hello world!",
"anonymous":true, "anonymous":true,
"titles":[ "titles":[
@@ -78,7 +78,7 @@ class `Constitution routes` : BaseTest() {
""") """)
} `Then the response should be` OK and { } `Then the response should be` OK and {
`And the response should not be null`() `And the response should not be null`()
`And have property`("$.version_id") `whish contains` "15814bb6-8d90-4c6a-a456-c3939a8ec75e" `And have property`("$.versionId") `whish contains` "15814bb6-8d90-4c6a-a456-c3939a8ec75e"
`And have property`("$.title") `whish contains` "Hello world!" `And have property`("$.title") `whish contains` "Hello world!"
} }
} }

View File

@@ -48,6 +48,7 @@ internal class `Article Access Control` {
private fun getRepo(article: ArticleForListing): ArticleRepo { private fun getRepo(article: ArticleForListing): ArticleRepo {
return mockk { return mockk {
every { find(1, 1, any()) } returns Paginated(listOf(article), 0, 1, 1) every { find(1, 1, any()) } returns Paginated(listOf(article), 0, 1, 1)
every { findVersionsByVersionId(1, 1, any()) } returns Paginated(listOf(article), 0, 1, 1)
} }
} }