Skip to content

Commit

Permalink
Test filePath instead of path. (#2604)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite authored Oct 28, 2024
1 parent 8f63d1e commit 1d4b9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion coil-core/src/commonTest/kotlin/coil3/map/PathMapperTest.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package coil3.map

import coil3.filePath
import coil3.request.Options
import coil3.test.utils.RobolectricTest
import coil3.test.utils.context
Expand All @@ -24,7 +25,7 @@ class PathMapperTest : RobolectricTest() {
fun parsesPoundCharacterCorrectly() {
val path = "/sdcard/fi#le.jpg"
val file = "/sdcard/fi#le.jpg".toPath()
assertEquals(path, mapper.map(file, Options(context)).path)
assertEquals(path, mapper.map(file, Options(context)).filePath)
}

/** Regression test: https://github.com/coil-kt/coil/issues/1513 */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package coil3.map

import coil3.filePath
import coil3.request.Options
import coil3.test.utils.RobolectricTest
import coil3.test.utils.context
Expand All @@ -24,7 +25,7 @@ class FileMapperTest : RobolectricTest() {
fun parsesPoundCharacterCorrectly() {
val path = "/sdcard/fi#le.jpg"
val file = File("/sdcard/fi#le.jpg")
assertEquals(path, mapper.map(file, Options(context)).path)
assertEquals(path, mapper.map(file, Options(context)).filePath)
}

/** Regression test: https://github.com/coil-kt/coil/issues/1513 */
Expand Down

0 comments on commit 1d4b9a8

Please sign in to comment.