Fix bugs in peer review flow (#3039) (#3042)

* Fix bugs in peer review flow

* Fix tests

* Bug fixes

* Fix remaining issues with peer review
This commit is contained in:
Vivek Maskara 2019-06-26 21:31:06 +05:30 committed by GitHub
parent 4ec92c2e7b
commit d7628959a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 140 additions and 125 deletions

View file

@ -48,9 +48,9 @@ class ReviewHelperTest {
`when`(mockRevision.user).thenReturn("TestUser")
`when`(mwQueryPage.revisions()).thenReturn(listOf(mockRevision))
val recentChange = getMockRecentChange("test", "File:Test1.jpeg", 0)
val recentChange1 = getMockRecentChange("test", "File:Test2.png", 0)
val recentChange2 = getMockRecentChange("test", "File:Test3.jpg", 0)
val recentChange = getMockRecentChange("log", "File:Test1.jpeg", 0)
val recentChange1 = getMockRecentChange("log", "File:Test2.png", 0)
val recentChange2 = getMockRecentChange("log", "File:Test3.jpg", 0)
val mwQueryResult = mock(MwQueryResult::class.java)
`when`(mwQueryResult.recentChanges).thenReturn(listOf(recentChange, recentChange1, recentChange2))
`when`(mwQueryResult.firstPage()).thenReturn(mwQueryPage)