Skip to content

Commit

Permalink
Add sorting regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 20, 2024
1 parent ccf27a1 commit 04d9fb7
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,14 @@ class FilterViewModelTest {
assertLists(expectedProviderList, state.allProviders)
}
}

@Test
fun `ensure that providers are sorted by name`() = runTest {
// Assert
viewModel.uiState.test {
val state = awaitItem()
assertEquals(state.allProviders.sorted(), state.allProviders)
assertEquals(state.selectableProviders.sorted(), state.selectableProviders)
}
}
}

0 comments on commit 04d9fb7

Please sign in to comment.