[fenix] No issue: Fixes ErrorResponse instantiation

pull/600/head
Sawyer Blatz 5 years ago
parent 314310faea
commit 5a3a810d5e

@ -65,7 +65,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
context.components.analytics.metrics.track(Event.ErrorPageVisited(improvedErrorType)) context.components.analytics.metrics.track(Event.ErrorPageVisited(improvedErrorType))
return RequestInterceptor.ErrorResponse( return RequestInterceptor.ErrorResponse.Content(
ErrorPages.createErrorPage( ErrorPages.createErrorPage(
context, context,
improvedErrorType, improvedErrorType,

@ -113,7 +113,9 @@ class AppRequestInterceptorTest {
} }
private fun createActualErrorPage(error: ErrorType): String { private fun createActualErrorPage(error: ErrorType): String {
return interceptor.onErrorRequest(session = mockk(), errorType = error, uri = null)?.data!! val errorPage = interceptor.onErrorRequest(session = mockk(), errorType = error, uri = null)
as RequestInterceptor.ErrorResponse.Content
return errorPage.data
} }
private fun createExpectedErrorPage(error: ErrorType, @RawRes html: Int, @RawRes css: Int): String { private fun createExpectedErrorPage(error: ErrorType, @RawRes html: Int, @RawRes css: Int): String {

Loading…
Cancel
Save