mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 17:12:38 +01:00
Test isVotable function.
This commit is contained in:
parent
a7bc2ef3bc
commit
2be43e9294
@ -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 New Issue
Block a user