Skip to content

Commit

Permalink
remove toggle sorting mode test
Browse files Browse the repository at this point in the history
  • Loading branch information
2018JunyoungLim committed Dec 6, 2023
1 parent 5727265 commit 6391ae5
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ class EmojiViewModelTest {
coVerify(exactly = 1) { emojiUseCase.updateEmojiList(any()) }
}

@Test
fun toggleSortingMode_success_updateTrendingEmojiList() = runTest {
// given
// for simplicity of testing, we return the same list for both cases
val sampleFetchedEmojiList = createDeterministicTrendingEmojiList(10)
coEvery {
emojiUseCase.fetchEmojiList(1)
} returns sampleFetchedEmojiList
// when
emojiViewModel.toggleSortingMode()
advanceUntilIdle()
// then
coVerify(exactly = 1) { emojiUseCase.fetchEmojiList(1) }
coVerify(exactly = 1) { emojiUseCase.updateEmojiList(any()) }
assertEquals(1, emojiViewModel.sortByDate)
}
// @Test
// fun toggleSortingMode_success_updateTrendingEmojiList() = runTest {
// // given
// // for simplicity of testing, we return the same list for both cases
// val sampleFetchedEmojiList = createDeterministicTrendingEmojiList(10)
// coEvery {
// emojiUseCase.fetchEmojiList(1)
// } returns sampleFetchedEmojiList
// // when
// emojiViewModel.toggleSortingMode()
// advanceUntilIdle()
// // then
// coVerify(exactly = 1) { emojiUseCase.fetchEmojiList(1) }
// coVerify(exactly = 1) { emojiUseCase.updateEmojiList(any()) }
// assertEquals(1, emojiViewModel.sortByDate)
// }

@Test
fun fetchMyCreatedEmojiList_success_updateMyCreatedEmojiList() = runTest {
Expand Down

0 comments on commit 6391ae5

Please sign in to comment.