diff --git a/vector/src/test/java/im/vector/app/features/home/room/detail/timeline/factory/PollItemFactoryTest.kt b/vector/src/test/java/im/vector/app/features/home/room/detail/timeline/factory/PollItemFactoryTest.kt index 50ddb0afb9..156cde6ff7 100644 --- a/vector/src/test/java/im/vector/app/features/home/room/detail/timeline/factory/PollItemFactoryTest.kt +++ b/vector/src/test/java/im/vector/app/features/home/room/detail/timeline/factory/PollItemFactoryTest.kt @@ -154,4 +154,19 @@ class PollItemFactoryTest { pollContent = disclosedPollContent, ) shouldBeEqualTo PollState.Voted(1) } + + @Test + fun `given a sent poll when poll type is disclosed then PollState is Ready`() = runTest { + val disclosedPollContent = A_POLL_CONTENT.copy( + unstablePollCreationInfo = A_POLL_CONTENT.getBestPollCreationInfo()?.copy( + kind = PollType.DISCLOSED_UNSTABLE + ) + ) + + pollItemFactory.createPollState( + informationData = A_MESSAGE_INFORMATION_DATA, + pollResponseSummary = A_POLL_RESPONSE_DATA, + pollContent = disclosedPollContent, + ) shouldBe PollState.Ready + } }