mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Do not use erroneous thumb url util function (#2901)
* Do not use erroneous thumb url util function * Remove unused code * Fix image loading for peer review * Clear disposable
This commit is contained in:
parent
70b19754fb
commit
a003e9706f
8 changed files with 28 additions and 88 deletions
|
|
@ -10,8 +10,7 @@ import org.junit.Test
|
|||
import org.mockito.ArgumentMatchers
|
||||
import org.mockito.InjectMocks
|
||||
import org.mockito.Mock
|
||||
import org.mockito.Mockito.`when`
|
||||
import org.mockito.Mockito.mock
|
||||
import org.mockito.Mockito.*
|
||||
import org.mockito.MockitoAnnotations
|
||||
import org.wikipedia.dataclient.mwapi.MwQueryPage
|
||||
import org.wikipedia.dataclient.mwapi.RecentChange
|
||||
|
|
@ -51,6 +50,10 @@ class ReviewHelperTest {
|
|||
|
||||
`when`(mediaWikiApi?.pageExists(ArgumentMatchers.anyString()))
|
||||
.thenReturn(Single.just(false))
|
||||
`when`(okHttpJsonApiClient?.getMedia(ArgumentMatchers.anyString(), ArgumentMatchers.anyBoolean()))
|
||||
.thenReturn(Single.just(mock(Media::class.java)))
|
||||
|
||||
|
||||
val randomMedia = reviewHelper?.randomMedia?.blockingGet()
|
||||
|
||||
assertTrue(randomMedia is Media)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue