test: remove irrelevant test

This commit is contained in:
Gauthier Roebroeck 2021-09-15 16:20:10 +08:00
parent a7204e85b9
commit d06d11a658

View file

@ -662,32 +662,6 @@ class BookDtoDaoTest(
assertThat(found.map { it.name }).containsExactly("X-Men", "Another X-Men adventure")
}
@Test
fun `given books when searching by single letter then results are ordered by rank`() {
// given
seriesLifecycle.addBooks(
series,
listOf(
makeBook("J", seriesId = series.id, libraryId = library.id),
makeBook("Adventures of J. J.", seriesId = series.id, libraryId = library.id),
makeBook("Jackal", seriesId = series.id, libraryId = library.id),
)
)
searchIndexLifecycle.rebuildIndex()
// when
val found = bookDtoDao.findAll(
BookSearchWithReadProgress(searchTerm = "j"),
user.id,
UnpagedSorted(Sort.by("relevance")),
).content
// then
assertThat(found).hasSize(2)
assertThat(found.map { it.name }).containsExactly("J", "Adventures of J. J.")
}
@Test
fun `when searching by unknown field then empty result are returned and no exception is thrown`() {
assertThatCode {