Updated tests

This commit is contained in:
ThomasSession 2024-09-16 09:59:34 +10:00
parent 7b7c053d18
commit c3cf2b8d03
2 changed files with 3 additions and 3 deletions

View File

@ -295,7 +295,7 @@ class ConversationViewModel(
* - We are dealing with a contact from a community (blinded recipient) that does not allow
* requests form community members
*/
private fun shouldHideInputBar(): Boolean = openGroup?.canWrite == false ||
fun shouldHideInputBar(): Boolean = openGroup?.canWrite == false ||
blindedRecipient?.blocksCommunityMessageRequests == true
fun legacyBannerRecipient(context: Context): Recipient? = recipient?.run {

View File

@ -203,7 +203,7 @@ class ConversationViewModelTest: BaseViewModelTest() {
@Test
fun `local recipient should have input and no blinded recipient`() {
whenever(recipient.isLocalNumber).thenReturn(true)
assertThat(viewModel.uiState.value.hideInputBar, equalTo(false))
assertThat(viewModel.shouldHideInputBar(), equalTo(false))
assertThat(viewModel.blindedRecipient, nullValue())
}
@ -215,7 +215,7 @@ class ConversationViewModelTest: BaseViewModelTest() {
}
whenever(repository.maybeGetBlindedRecipient(recipient)).thenReturn(blinded)
assertThat(viewModel.blindedRecipient, notNullValue())
assertThat(viewModel.uiState.value.hideInputBar, equalTo(true))
assertThat(viewModel.shouldHideInputBar(), equalTo(true))
}
}