Skip to content

Commit e9fb34e

Browse files
committed
fix test use the new repository find function in findAllDatasets
1 parent 364520e commit e9fb34e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dataset/src/test/kotlin/com/cosmotech/dataset/service/DatasetServiceImplTests.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import org.junit.jupiter.api.assertThrows
4444
import org.junit.jupiter.api.extension.ExtendWith
4545
import org.springframework.core.io.ByteArrayResource
4646
import org.springframework.data.domain.Page
47+
import org.springframework.data.domain.PageRequest
4748
import org.springframework.data.domain.Pageable
4849
import org.springframework.web.context.request.RequestContextHolder
4950
import org.springframework.web.context.request.ServletRequestAttributes
@@ -104,7 +105,7 @@ class DatasetServiceImplTests {
104105
@Test
105106
fun `findAllDatasets should return empty list when no dataset exists`() {
106107
every { organizationService.getVerifiedOrganization(ORGANIZATION_ID) } returns Organization()
107-
every { datasetRepository.findAll(any<Pageable>()) } returns Page.empty()
108+
every { datasetRepository.findByOrganizationIdNoSecurity(any<String>(), any<PageRequest>()) } returns Page.empty()
108109

109110
val result = datasetService.findAllDatasets(ORGANIZATION_ID, null, null)
110111
assertEquals(emptyList(), result)

0 commit comments

Comments
 (0)