Skip to content

Commit

Permalink
fix sendPaidMedia test
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Dec 16, 2024
1 parent fcf32d9 commit 185e30c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import eu.vendeli.tgbot.types.internal.InputFile
import eu.vendeli.tgbot.utils.toImplicitFile
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.InternalSerializationApi
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.serializer

Expand All @@ -18,6 +19,7 @@ sealed class InputPaidMedia : ImplicitMediaData {
}

@Serializable
@SerialName("photo")
data class Photo(
override var media: ImplicitFile,
) : InputPaidMedia() {
Expand All @@ -26,6 +28,7 @@ sealed class InputPaidMedia : ImplicitMediaData {
}

@Serializable
@SerialName("video")
data class Video(
override var media: ImplicitFile,
override var thumbnail: ImplicitFile? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class SendPaidMediaTest : BotTestContext() {

request.run {
paidMedia.shouldNotBeNull()
paidMedia!!.starCount shouldBe 1
paidMedia!!.paidMedia.size shouldBe 2
paidMedia!!.paidMedia.all { it.type == "photo" } shouldBe true
paidMedia.starCount shouldBe 1
paidMedia.paidMedia.size shouldBe 2
paidMedia.paidMedia.all { it.type == "photo" } shouldBe true
}
}
}

0 comments on commit 185e30c

Please sign in to comment.