From 033acc818dab1e2aa99022226b97cb0014279994 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 3 Nov 2019 00:36:07 +0600 Subject: [PATCH] hotfix for InMemoryPostsAPI --- .../insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/test/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt b/core/src/test/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt index c136f86a..a6c7baac 100644 --- a/core/src/test/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt +++ b/core/src/test/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt @@ -25,7 +25,7 @@ class InMemoryPostsAPI( post.content.any { it.id == id } } override suspend fun getPostsByDates(from: DateTime?, to: DateTime?): List = posts.values.filter { - from ?.let { _ -> it.creationDate > from } ?: true && to ?.let { _ -> it.creationDate < to } ?: true + from ?.let { _ -> it.creationDate >= from } ?: true && to ?.let { _ -> it.creationDate <= to } ?: true } override suspend fun getPostsByPagination( pagination: Pagination @@ -39,6 +39,4 @@ class InMemoryPostsAPI( it ) } - - }