Test ready option view states.
This commit is contained in:
parent
2cf40cbcf2
commit
0f0492db3b
|
@ -185,4 +185,19 @@ class PollItemFactoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `given a sent poll then all option view states is PollReady`() = runTest {
|
||||||
|
with(pollItemFactory) {
|
||||||
|
A_POLL_CONTENT
|
||||||
|
.getBestPollCreationInfo()
|
||||||
|
?.answers
|
||||||
|
?.mapToOptions(PollState.Sending, A_MESSAGE_INFORMATION_DATA)
|
||||||
|
?.forEachIndexed { index, pollOptionViewState ->
|
||||||
|
A_POLL_CONTENT.getBestPollCreationInfo()?.answers?.get(index)?.let { option ->
|
||||||
|
pollOptionViewState shouldBeEqualTo PollOptionViewState.PollSending(option.id ?: "", option.getBestAnswer() ?: "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue