Skip to content

Commit

Permalink
Make sure Contacts Group CRUD FF is updated
Browse files Browse the repository at this point in the history
NOJIRA
  • Loading branch information
nick0602 authored and MargeBot committed May 8, 2024
1 parent 4609dbc commit a7d6223
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ContactListViewModel @Inject constructor(
observeContacts(userId),
observeContactGroupLabels(userId)
) { contacts, contactGroups ->
val isContactGroupsCrudEnabled = isContactGroupsCrudEnabled(userId)
val isContactGroupsCrudEnabled = isContactGroupsCrudEnabled(null)
val contactList = contacts.getOrElse {
Timber.e("Error while observing contacts")
return@combine ContactListEvent.ErrorLoadingContactList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ContactListViewModelTest {
private val observeContacts = mockk<ObserveContacts>()
private val observeContactGroupLabels = mockk<ObserveContactGroupLabels>()
private val isContactGroupsCrudEnabledMock = mockk<IsContactGroupsCrudEnabled> {
every { this@mockk(any()) } returns true
every { this@mockk(null) } returns true
}

private val reducer = ContactListReducer()
Expand Down Expand Up @@ -229,7 +229,7 @@ class ContactListViewModelTest {
fun `when feature flag IsContactGroupsCrudEnabled is false then emit appropriate event`() = runTest {
// Given
expectContactsData()
every { isContactGroupsCrudEnabledMock.invoke(any()) } returns false
every { isContactGroupsCrudEnabledMock.invoke(null) } returns false

// When
contactListViewModel.state.test {
Expand Down

0 comments on commit a7d6223

Please sign in to comment.