mirror of
https://github.com/gotson/komga.git
synced 2026-01-04 23:02:56 +01:00
test(komga): fix epub tests
This commit is contained in:
parent
92b721ca80
commit
f3a0a3288c
2 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import org.junit.jupiter.params.provider.Arguments
|
|||
import org.junit.jupiter.params.provider.MethodSource
|
||||
import org.springframework.core.io.ClassPathResource
|
||||
import java.util.stream.Stream
|
||||
import kotlin.io.path.Path
|
||||
|
||||
class NavTest {
|
||||
@ParameterizedTest
|
||||
|
|
@ -17,7 +18,7 @@ class NavTest {
|
|||
val navString = navResource.inputStream.readAllBytes().decodeToString()
|
||||
|
||||
// when
|
||||
val nav = processNav(navString, navType)
|
||||
val nav = processNav(ResourceContent(Path("${prefix?.let { "$it/" }}nav.xhtml"), navString), navType)
|
||||
|
||||
// then
|
||||
val expectedNav = expectedProvider(prefix?.let { "$it/" } ?: "")
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import org.junit.jupiter.params.provider.Arguments
|
|||
import org.junit.jupiter.params.provider.MethodSource
|
||||
import org.springframework.core.io.ClassPathResource
|
||||
import java.util.stream.Stream
|
||||
import kotlin.io.path.Path
|
||||
|
||||
class NcxTest {
|
||||
@ParameterizedTest
|
||||
|
|
@ -17,7 +18,7 @@ class NcxTest {
|
|||
val ncxString = ncxResource.inputStream.readAllBytes().decodeToString()
|
||||
|
||||
// when
|
||||
val ncxNav = processNcx(ncxString, navType)
|
||||
val ncxNav = processNcx(ResourceContent(Path("${prefix?.let { "$it/" }}toc.ncx"), ncxString), navType)
|
||||
|
||||
// then
|
||||
val expectedNav = expectedProvider(prefix?.let { "$it/" } ?: "")
|
||||
|
|
|
|||
Loading…
Reference in a new issue