diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadataKtTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadataKtTest.kt index 11dc75b015..71dda9ff70 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadataKtTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadataKtTest.kt @@ -61,6 +61,7 @@ import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailType import kotlinx.coroutines.test.runTest import org.junit.Test import org.junit.runner.RunWith +import kotlin.time.Duration.Companion.minutes @RunWith(AndroidJUnit4::class) class InReplyToMetadataKtTest { @@ -137,16 +138,7 @@ class InReplyToMetadataKtTest { messageType = VideoMessageType( body = "body", source = aMediaSource(), - info = VideoInfo( - duration = null, - height = null, - width = null, - mimetype = null, - size = null, - thumbnailInfo = null, - thumbnailSource = aMediaSource(), - blurhash = A_BLUR_HASH - ), + info = aVideoInfo(), ) ) ).metadata() @@ -447,6 +439,19 @@ fun anInReplyToDetails( textContent = textContent, ) +fun aVideoInfo(): VideoInfo { + return VideoInfo( + duration = 1.minutes, + height = 100, + width = 100, + mimetype = "video/mp4", + size = 1000, + thumbnailInfo = null, + thumbnailSource = aMediaSource(), + blurhash = A_BLUR_HASH, + ) +} + fun anImageInfo(): ImageInfo { return ImageInfo( height = 100,