Skip to content

Commit 71c4960

Browse files
committed
fix incorrect getHeaderField null mocking
The real getHeaderField supports returning null when the key is not set. Correcting this fixes failing HTTPClientTest
1 parent 0e1f4a9 commit 71c4960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OneSignalSDK/onesignal/core/src/test/java/com/onesignal/core/internal/http/MockHttpConnectionFactory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ internal class MockHttpConnectionFactory(
4242
override fun connect() {
4343
}
4444

45-
override fun getHeaderField(name: String): String {
46-
return mockResponse.mockProps[name]!!
45+
override fun getHeaderField(name: String): String? {
46+
return mockResponse.mockProps[name]
4747
}
4848

4949
@Throws(IOException::class)

0 commit comments

Comments
 (0)