mirror of
https://github.com/gotson/komga.git
synced 2026-05-04 18:42:10 +02:00
test: fix warnings and failing test on CI
This commit is contained in:
parent
92059518cb
commit
7fe94143f1
4 changed files with 5 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ class ReadProgressDaoTest(
|
|||
assertThat(page).isEqualTo(10)
|
||||
assertThat(completed).isEqualTo(true)
|
||||
assertThat(bookId).isEqualTo(book1.id)
|
||||
assertThat(readDate).isEqualTo(readDateInThePast)
|
||||
assertThat(readDate).isEqualToIgnoringNanos(readDateInThePast)
|
||||
assertThat(createdDate)
|
||||
.isBefore(modificationDate)
|
||||
.isNotEqualTo(lastModifiedDate)
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ class SeriesDtoDaoTest(
|
|||
@Test
|
||||
fun `given series when searching by deleted then results are matched`() {
|
||||
// given
|
||||
val series = seriesLifecycle.createSeries(makeSeries("Batman", library.id).copy(deletedDate = LocalDateTime.now()))
|
||||
seriesLifecycle.createSeries(makeSeries("Batman", library.id).copy(deletedDate = LocalDateTime.now()))
|
||||
seriesLifecycle.createSeries(makeSeries("Batman and Robin", library.id))
|
||||
|
||||
searchIndexLifecycle.rebuildIndex()
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ class MultilingualAnalyzerTest {
|
|||
private val analyzer = MultiLingualAnalyzer()
|
||||
|
||||
private fun Analyzer.getTokens(text: String): List<String> {
|
||||
val ts = tokenStream("text", text)
|
||||
val tokenStream = tokenStream("text", text)
|
||||
|
||||
val tokens = mutableListOf<String>()
|
||||
ts.use { ts ->
|
||||
tokenStream.use { ts ->
|
||||
ts.reset()
|
||||
while (ts.incrementToken()) {
|
||||
ts.reflectWith { _, key, value -> if (key == "term") tokens += value.toString() }
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ class BookControllerTest(
|
|||
val book1 = makeBook("1", libraryId = library.id)
|
||||
val book2 = makeBook("2", libraryId = library.id)
|
||||
val book3 = makeBook("3", libraryId = library.id)
|
||||
val series = makeSeries(name = "series", libraryId = library.id).let { series ->
|
||||
makeSeries(name = "series", libraryId = library.id).let { series ->
|
||||
seriesLifecycle.createSeries(series).also { created ->
|
||||
val books = listOf(book1, book2, book3)
|
||||
seriesLifecycle.addBooks(created, books)
|
||||
|
|
|
|||
Loading…
Reference in a new issue