Skip to content

Commit 7b4ecc7

Browse files
committed
added test
1 parent 21364bc commit 7b4ecc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

datapipelines/src/test/java/io/customer/datapipelines/DataPipelinesInteractionTests.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import io.customer.datapipelines.testutils.utils.screenEvents
1515
import io.customer.datapipelines.testutils.utils.trackEvents
1616
import io.customer.sdk.core.di.SDKComponent
1717
import io.customer.sdk.data.model.CustomAttributes
18+
import io.customer.sdk.data.model.Settings
1819
import io.customer.sdk.data.store.DeviceStore
1920
import io.customer.sdk.data.store.GlobalPreferenceStore
2021
import io.customer.sdk.util.EventNames
@@ -593,6 +594,11 @@ class DataPipelinesInteractionTests : JUnitTest() {
593594
deviceRegisterEvent.context.deviceToken shouldBeEqualTo givenToken
594595
}
595596

597+
@Test
598+
fun device_givenSDKInitialized_expectSettingsToBeStored() {
599+
assertCalledOnce { globalPreferenceStore.saveSettings(Settings(writeKey = analytics.configuration.writeKey, apiHost = analytics.configuration.apiHost)) }
600+
}
601+
596602
@Test
597603
fun device_givenRegisterTokenWhenNoProfileIdentified_expectStoreAndRegisterDeviceForAnonymousProfile() {
598604
val givenToken = String.random

0 commit comments

Comments
 (0)