mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Test ready poll state.
This commit is contained in:
parent
2c5ddca821
commit
5a948891f0
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue