fix ShareUtilsTest

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

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-03-04 12:58:40 +01:00
parent 1612639b2e
commit abe9a9d5fb
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -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")