Bugfix/fix upload presenter tests (#3158)

* Revert "Merge branch 'backend-overhaul' into master"

This reverts commit 0090f24257, reversing
changes made to 9bccbfe443.

* * Fixed upload presenter tests
* Deleted app/src/main/res/values-en-gb/error.xml
This commit is contained in:
Ashish Kumar 2019-09-29 15:08:46 +05:30 committed by Josephine Lim
parent aae16e9679
commit 68e27d49e1
2 changed files with 12 additions and 10 deletions

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Authors:
* Cblair91
-->
<resources>
<string name="crash_dialog_title">Commons has crashed</string>
<string name="crash_dialog_text">Oops. Something went wrong!</string>
<string name="crash_dialog_comment_prompt">Tell us what you were doing, then share it via email to us. Will help us fix it!</string>
<string name="crash_dialog_ok_toast">Thank you!</string>
</resources>

View file

@ -50,6 +50,18 @@ class UploadPresenterTest {
`when`(uploadableFile?.filePath).thenReturn("data://test")
}
/**
* unit test case for method UploadPresenter.handleSubmit
*/
@Test
fun handleSubmitTest() {
uploadPresenter?.handleSubmit()
verify(view)?.isLoggedIn
verify(view)?.showProgress(true)
verify(repository)?.buildContributions()
verify(repository)?.buildContributions()
}
/**
* unit test for UploadMediaPresenter.deletePictureAtIndex
*/