mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
* fixed:After canceling a sharing, application goes back to the search menu #2296 * fixed:After canceling a sharing, application goes back to the search menu #2296 * fixed:After canceling a sharing, application goes back to the search menu #2296 * fixed SeachActivityUnityTest failure when calling testOnBackPressed and cleaned up unnecessary code
This commit is contained in:
parent
7d895c4379
commit
94d462cafb
3 changed files with 26 additions and 4 deletions
|
|
@ -26,6 +26,7 @@ import org.junit.jupiter.api.Assertions.assertEquals
|
|||
import org.junit.jupiter.api.Assertions.assertNull
|
||||
import org.junit.runner.RunWith
|
||||
import org.mockito.Mock
|
||||
import org.mockito.Mockito.times
|
||||
import org.mockito.Mockito.`when`
|
||||
import org.mockito.MockitoAnnotations
|
||||
import org.powermock.api.mockito.PowerMockito.mock
|
||||
|
|
@ -124,7 +125,7 @@ class SearchActivityUnitTests {
|
|||
`when`(mFragments.supportFragmentManager).thenReturn(supportFragmentManager)
|
||||
`when`(supportFragmentManager.backStackEntryCount).thenReturn(0)
|
||||
activity.onBackPressed()
|
||||
verify(supportFragmentManager).backStackEntryCount
|
||||
verify(supportFragmentManager, times(2)).backStackEntryCount
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue