Browse Source

fix ShareUtilsTest

fix to not assume baseUrl can't be null for mockito 'when' condition

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 1 year ago
parent
commit
abe9a9d5fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/test/java/com/nextcloud/talk/utils/ShareUtilsTest.kt

+ 1 - 1
app/src/test/java/com/nextcloud/talk/utils/ShareUtilsTest.kt

@@ -55,7 +55,7 @@ class ShareUtilsTest {
     fun setUp() {
         MockitoAnnotations.openMocks(this)
         Mockito.`when`(userManager!!.currentUser).thenReturn(Maybe.just(user))
-        Mockito.`when`(user!!.baseUrl!!).thenReturn(baseUrl)
+        Mockito.`when`(user!!.baseUrl).thenReturn(baseUrl)
         Mockito.`when`(context!!.resources).thenReturn(resources)
         Mockito.`when`(resources!!.getString(R.string.nc_share_text))
             .thenReturn("Join the conversation at %1\$s/index.php/call/%2\$s")