mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Bugfix/fix upload presenter tests (#3158)
* Revert "Merge branch 'backend-overhaul' into master" This reverts commit0090f24257, reversing changes made to9bccbfe443. * * Fixed upload presenter tests * Deleted app/src/main/res/values-en-gb/error.xml
This commit is contained in:
parent
aae16e9679
commit
68e27d49e1
2 changed files with 12 additions and 10 deletions
|
|
@ -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>
|
||||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue