mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Test isVotable function.
This commit is contained in:
parent
a7bc2ef3bc
commit
2be43e9294
1 changed files with 14 additions and 0 deletions
|
@ -265,4 +265,18 @@ class PollItemFactoryTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `given a poll state when it is not Sending and not Ended then the poll is votable`() = runTest {
|
||||
val sendingPollState = PollState.Sending
|
||||
sendingPollState.isVotable() shouldBe false
|
||||
val readyPollState = PollState.Ready
|
||||
readyPollState.isVotable() shouldBe true
|
||||
val votedPollState = PollState.Voted(1)
|
||||
votedPollState.isVotable() shouldBe true
|
||||
val undisclosedPollState = PollState.Undisclosed
|
||||
undisclosedPollState.isVotable() shouldBe true
|
||||
var endedPollState = PollState.Ended
|
||||
endedPollState.isVotable() shouldBe false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue