Fix comment voter

This commit is contained in:
2020-03-18 00:51:42 +01:00
parent 118193210b
commit a99eaf3eef
4 changed files with 18 additions and 19 deletions

View File

@@ -82,7 +82,7 @@ class ArticleSteps : En, KoinTest {
("$firstName-$lastName".toLowerCase()).toLowerCase().replace(' ', '-')
) ?: error("Citizen not exist")
val comment: CommentEntity<ArticleRef> = CommentEntity(
val comment: CommentEntity<ArticleEntity> = CommentEntity(
id = id ?: params?.get("id")?.let { UUID.fromString(it) } ?: UUID.randomUUID(),
createdBy = citizen,
target = article,

View File

@@ -30,7 +30,7 @@ Feature: comment Article
And I am authenticated as Pierre Curie
And I have article
| id | 5e209f63-57ce-43ca-922a-273b0d62f567 |
And I have comment created by Enrico Fermi on article "5e209f63-57ce-43ca-922a-273b0d62f567"
And I have comment created by Pierre Curie on article "5e209f63-57ce-43ca-922a-273b0d62f567"
When I send a GET request to "/articles/5e209f63-57ce-43ca-922a-273b0d62f567/comments?sort=votes"
Then the response status code should be 200
And the response should contain object: