#4048 - "copy to subsequent media" button (#4308)

* added copy to subsequent media button

* minor change

Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
Pratham Pahariya 2021-04-02 11:42:11 +05:30 committed by GitHub
parent ff96f5047e
commit a479dd5bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 54 additions and 44 deletions

View file

@ -164,30 +164,19 @@ class UploadMediaPresenterTest {
}
/**
* Test fetch previous image title when there was one
* Test fetch image title when there was one
*/
@Test
fun fetchPreviousImageAndTitleTestPositive() {
fun fetchImageAndTitleTest() {
whenever(repository.uploads).thenReturn(listOf(uploadItem))
whenever(repository.getPreviousUploadItem(ArgumentMatchers.anyInt()))
whenever(repository.getUploadItem(ArgumentMatchers.anyInt()))
.thenReturn(uploadItem)
whenever(uploadItem.uploadMediaDetails).thenReturn(listOf())
uploadMediaPresenter.fetchPreviousTitleAndDescription(0)
uploadMediaPresenter.fetchTitleAndDescription(0)
verify(view).updateMediaDetails(ArgumentMatchers.any())
}
/**
* Test fetch previous image title when there was none
*/
@Test
fun fetchPreviousImageAndTitleTestNegative() {
whenever(repository.getPreviousUploadItem(ArgumentMatchers.anyInt()))
.thenReturn(null)
uploadMediaPresenter.fetchPreviousTitleAndDescription(0)
verify(view).showMessage(ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())
}
/**
* Test bad image invalid location
*/