feature: #6: Add cucumber test for article routes
This commit is contained in:
@@ -6,9 +6,10 @@ import org.koin.dsl.module
|
||||
import java.io.File
|
||||
import fr.dcproject.repository.Article as ArticleRepository
|
||||
|
||||
val config = Config()
|
||||
|
||||
@KtorExperimentalAPI
|
||||
val Module = module {
|
||||
val config = Config()
|
||||
|
||||
single { config }
|
||||
|
||||
|
||||
@@ -21,10 +21,17 @@ class Article(override var requester: Requester) : RepositoryI<ArticleEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
fun find(page: Int = 1, limit: Int = 50, sort: String? = null, direction: Direction? = null, search: String? = null): Paginated<ArticleEntity> {
|
||||
fun find(
|
||||
page: Int = 1,
|
||||
limit: Int = 50,
|
||||
sort: String? = null,
|
||||
direction: Direction? = null,
|
||||
search: String? = null
|
||||
): Paginated<ArticleEntity> {
|
||||
return requester
|
||||
.getFunction("find_articles")
|
||||
.select(page, limit,
|
||||
.select(
|
||||
page, limit,
|
||||
"sort" to sort?.toSnakeCase(),
|
||||
"direction" to direction,
|
||||
"search" to search
|
||||
|
||||
Reference in New Issue
Block a user