From 4aca1dcb24788688aafaf6008d1c556a1a7b87e2 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Tue, 11 Oct 2022 14:28:03 +0200 Subject: [PATCH] Fix after rebase --- .../features/settings/devices/v2/list/SessionInfoView.kt | 1 + .../java/im/vector/app/test/fakes/FakePushersService.kt | 9 +++++++++ .../test/java/im/vector/app/test/fakes/FakeSession.kt | 2 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionInfoView.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionInfoView.kt index 6f6c5b24e2..5d558c517f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionInfoView.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionInfoView.kt @@ -184,6 +184,7 @@ class SessionInfoView @JvmOverloads constructor( } views.sessionInfoLastIPAddressTextView.setTextOrHide(deviceInfo.lastSeenIp?.takeIf { isLastSeenDetailsVisible }) + views.sessionInfoLastIPAddressTextView.text = "XX.XXX.XXX.XX" } private fun renderDetailsButton(isDetailsButtonVisible: Boolean) { diff --git a/vector/src/test/java/im/vector/app/test/fakes/FakePushersService.kt b/vector/src/test/java/im/vector/app/test/fakes/FakePushersService.kt index 60d50eab03..1a882b48c6 100644 --- a/vector/src/test/java/im/vector/app/test/fakes/FakePushersService.kt +++ b/vector/src/test/java/im/vector/app/test/fakes/FakePushersService.kt @@ -20,6 +20,7 @@ import androidx.lifecycle.liveData import io.mockk.Ordering import io.mockk.coVerify import io.mockk.every +import io.mockk.justRun import io.mockk.mockk import io.mockk.slot import io.mockk.verify @@ -45,4 +46,12 @@ class FakePushersService : PushersService by mockk(relaxed = true) { verify { enqueueAddHttpPusher(capture(httpPusherSlot)) } return httpPusherSlot.captured } + + fun givenRefreshPushersSucceeds() { + justRun { refreshPushers() } + } + + fun verifyRefreshPushers() { + verify { refreshPushers() } + } } diff --git a/vector/src/test/java/im/vector/app/test/fakes/FakeSession.kt b/vector/src/test/java/im/vector/app/test/fakes/FakeSession.kt index ef2104ed8a..c40e4a8fc4 100644 --- a/vector/src/test/java/im/vector/app/test/fakes/FakeSession.kt +++ b/vector/src/test/java/im/vector/app/test/fakes/FakeSession.kt @@ -45,7 +45,6 @@ class FakeSession( private val fakeEventService: FakeEventService = FakeEventService(), val fakeSessionAccountDataService: FakeSessionAccountDataService = FakeSessionAccountDataService(), val fakeFilterService: FakeFilterService = FakeFilterService(), - val fakePushersService: FakePushersService = FakePushersService(), ) : Session by mockk(relaxed = true) { init { @@ -65,7 +64,6 @@ class FakeSession( override fun pushersService() = fakePushersService override fun accountDataService() = fakeSessionAccountDataService override fun filterService() = fakeFilterService - override fun pushersService() = fakePushersService fun givenVectorStore(vectorSessionStore: VectorSessionStore) { coEvery {