1
0
Fork 0

No issue: Fixes ErrorResponse instantiation

master
Sawyer Blatz 2020-01-22 09:21:20 -08:00
parent 310da6c1ea
commit e1722b95b3
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -113,7 +113,9 @@ class AppRequestInterceptorTest {
}
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 {