From 82b5fc9557cbd775a5eefe20c9dcfb46304b7e52 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 8 Mar 2022 16:50:49 +0100 Subject: [PATCH] Removes unused imports --- .../sdk/internal/session/space/ResolveSpaceInfoTask.kt | 1 - .../java/org/matrix/android/sdk/test/fakes/FakeSpaceApi.kt | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt index 305bc5db04..16a3511e32 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt @@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.session.space import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task -import retrofit2.HttpException import javax.inject.Inject internal interface ResolveSpaceInfoTask : Task { diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeSpaceApi.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeSpaceApi.kt index 26ee295236..b851e15575 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeSpaceApi.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeSpaceApi.kt @@ -18,13 +18,9 @@ package org.matrix.android.sdk.test.fakes import io.mockk.coEvery import io.mockk.mockk -import okhttp3.ResponseBody.Companion.toResponseBody import org.matrix.android.sdk.internal.session.space.SpaceApi -import org.matrix.android.sdk.internal.session.space.SpacesResponse import org.matrix.android.sdk.test.fixtures.ResolveSpaceInfoTaskParamsFixture import org.matrix.android.sdk.test.fixtures.SpacesResponseFixture -import retrofit2.HttpException -import retrofit2.Response internal class FakeSpaceApi { @@ -37,8 +33,7 @@ internal class FakeSpaceApi { } fun givenStableEndpointFails() { - val errorResponse = Response.error(500, "".toResponseBody()) - coEvery { instance.getSpaceHierarchy(params.spaceId, params.suggestedOnly, params.limit, params.maxDepth, params.from) } throws HttpException(errorResponse) + coEvery { instance.getSpaceHierarchy(params.spaceId, params.suggestedOnly, params.limit, params.maxDepth, params.from) } throws Exception() } fun givenUnstableEndpointWorks() {