mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Fixes invalid authorname in explore (#4054)
* Fixes #3341, #4018 * Defined two feild author and user in Media and used them at the corresponding places Minor bug fixes -displaying userName in uploadedBy. -modified HTML parsing in getArtist. -Replaced creator with author. * Fixes #3341, #4018 * Defined two feild author and user in Media and used them at the corresponding places Minor bug fixes -displaying userName in uploadedBy. -modified HTML parsing in getArtist. -Replaced creator with author.
This commit is contained in:
parent
f1b40728b2
commit
d720750ab4
17 changed files with 56 additions and 61 deletions
|
|
@ -56,7 +56,7 @@ class DeleteHelperTest {
|
|||
whenever(media.displayTitle).thenReturn("Test file")
|
||||
|
||||
val creatorName = "Creator"
|
||||
whenever(media.creator).thenReturn("$creatorName (page does not exist)")
|
||||
whenever(media.author).thenReturn("$creatorName")
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
|
||||
val makeDeletion = deleteHelper.makeDeletion(context, media, "Test reason")?.blockingGet()
|
||||
|
|
@ -78,7 +78,7 @@ class DeleteHelperTest {
|
|||
.thenReturn(Observable.just(true))
|
||||
whenever(media.displayTitle).thenReturn("Test file")
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
whenever(media.creator).thenReturn("Creator (page does not exist)")
|
||||
whenever(media.author).thenReturn("Creator (page does not exist)")
|
||||
|
||||
deleteHelper.makeDeletion(context, media, "Test reason")?.blockingGet()
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ class DeleteHelperTest {
|
|||
.thenReturn(Observable.just(false))
|
||||
whenever(media.displayTitle).thenReturn("Test file")
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
whenever(media.creator).thenReturn("Creator (page does not exist)")
|
||||
whenever(media.author).thenReturn("Creator (page does not exist)")
|
||||
|
||||
deleteHelper.makeDeletion(context, media, "Test reason")?.blockingGet()
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ class DeleteHelperTest {
|
|||
.thenReturn(Observable.just(true))
|
||||
whenever(media.displayTitle).thenReturn("Test file")
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
whenever(media.creator).thenReturn("Creator (page does not exist)")
|
||||
whenever(media.author).thenReturn("Creator (page does not exist)")
|
||||
|
||||
deleteHelper.makeDeletion(context, media, "Test reason")?.blockingGet()
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ class DeleteHelperTest {
|
|||
whenever(media.displayTitle).thenReturn("Test file")
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
|
||||
whenever(media.creator).thenReturn(null)
|
||||
whenever(media.author).thenReturn(null)
|
||||
|
||||
deleteHelper.makeDeletion(context, media, "Test reason")?.blockingGet()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class UploadControllerTest {
|
|||
val contribution = mock(Contribution::class.java)
|
||||
val media = mock<Media>()
|
||||
whenever(contribution.media).thenReturn(media)
|
||||
whenever(media.creator).thenReturn("Creator")
|
||||
whenever(media.author).thenReturn("Creator")
|
||||
uploadController!!.startUpload(contribution)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue