mirror of
https://github.com/gotson/komga.git
synced 2026-05-05 02:53:09 +02:00
refactor: remove deprecation warning
This commit is contained in:
parent
6b690bcdfb
commit
6a2e57033d
1 changed files with 2 additions and 1 deletions
|
|
@ -14,12 +14,13 @@ import org.junit.jupiter.api.Test
|
|||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.time.LocalDateTime
|
||||
import kotlin.io.path.extension
|
||||
|
||||
class LocalArtworkProviderTest {
|
||||
|
||||
private val contentDetector = spyk(ContentDetector(TikaConfiguration().tika())).also {
|
||||
every { it.detectMediaType(any<Path>()) } answers {
|
||||
when (FilenameUtils.getExtension(firstArg<Path>().toString().toLowerCase())) {
|
||||
when (firstArg<Path>().extension.lowercase()) {
|
||||
"jpg", "jpeg", "tbn" -> "image/jpeg"
|
||||
"png" -> "image/png"
|
||||
else -> "application/octet-stream"
|
||||
|
|
|
|||
Loading…
Reference in a new issue