@@ -3,7 +3,7 @@ package com.onesignal.core.internal.http
3
3
import com.onesignal.common.OneSignalUtils
4
4
import com.onesignal.core.internal.device.impl.InstallIdService
5
5
import com.onesignal.core.internal.http.impl.HttpClient
6
- import com.onesignal.core.internal.http.impl.OptionalHeaderValues
6
+ import com.onesignal.core.internal.http.impl.OptionalHeaders
7
7
import com.onesignal.core.internal.time.impl.Time
8
8
import com.onesignal.debug.LogLevel
9
9
import com.onesignal.debug.internal.logging.Logging
@@ -89,11 +89,10 @@ class HttpClientTests : FunSpec({
89
89
val httpClient = mocks.httpClient
90
90
91
91
// When
92
- val headerValues = OptionalHeaderValues ()
93
- headerValues.cacheKey = " CACHE_KEY"
94
- val response1 = httpClient.get("URL ", headerValues)
92
+ val headers = OptionalHeaders (cacheKey = "CACHE_KEY ")
93
+ val response1 = httpClient.get("URL ", headers)
95
94
factory.mockResponse = mockResponse2
96
- val response2 = httpClient.get("URL ", headerValues )
95
+ val response2 = httpClient.get("URL ", headers )
97
96
98
97
// Then
99
98
response1.statusCode shouldBe 200
@@ -126,15 +125,14 @@ class HttpClientTests : FunSpec({
126
125
val httpClient = mocks.httpClient
127
126
128
127
// When
129
- val headerValues = OptionalHeaderValues ()
130
- headerValues.cacheKey = " CACHE_KEY"
131
- val response1 = httpClient.get("URL ", headerValues)
128
+ val headers = OptionalHeaders (cacheKey = "CACHE_KEY ")
129
+ val response1 = httpClient.get("URL ", headers)
132
130
133
131
factory.mockResponse = mockResponse2
134
- val response2 = httpClient.get("URL ", headerValues )
132
+ val response2 = httpClient.get("URL ", headers )
135
133
136
134
factory.mockResponse = mockResponse3
137
- val response3 = httpClient.get("URL ", headerValues )
135
+ val response3 = httpClient.get("URL ", headers )
138
136
139
137
// Then
140
138
response1.statusCode shouldBe 200
0 commit comments