Skip to content

Commit 0fce61c

Browse files
committed
fix missing sessionTime in outcomes test
This was the only test failing in this file and now it is passing.
1 parent 48f9633 commit 0fce61c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

OneSignalSDK/onesignal/core/src/test/java/com/onesignal/session/internal/outcomes/OutcomeEventsRepositoryTests.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ class OutcomeEventsRepositoryTests : FunSpec({
171171
OutcomeEventsTable.COLUMN_NAME_NAME to "outcomeId1",
172172
OutcomeEventsTable.COLUMN_NAME_WEIGHT to 0.2f,
173173
OutcomeEventsTable.COLUMN_NAME_TIMESTAMP to 1111L,
174+
OutcomeEventsTable.COLUMN_NAME_SESSION_TIME to 1L,
174175
OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_INFLUENCE_TYPE to "unattributed",
175176
OutcomeEventsTable.COLUMN_NAME_IAM_INFLUENCE_TYPE to "unattributed",
176177
),
177178
mapOf(
178179
OutcomeEventsTable.COLUMN_NAME_NAME to "outcomeId2",
179180
OutcomeEventsTable.COLUMN_NAME_WEIGHT to 0.4f,
180181
OutcomeEventsTable.COLUMN_NAME_TIMESTAMP to 2222L,
182+
OutcomeEventsTable.COLUMN_NAME_SESSION_TIME to 2L,
181183
OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_INFLUENCE_TYPE to "indirect",
182184
OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_IDS to "[\"notificationId1\",\"notificationId2\"]",
183185
OutcomeEventsTable.COLUMN_NAME_IAM_INFLUENCE_TYPE to "indirect",
@@ -187,6 +189,7 @@ class OutcomeEventsRepositoryTests : FunSpec({
187189
OutcomeEventsTable.COLUMN_NAME_NAME to "outcomeId3",
188190
OutcomeEventsTable.COLUMN_NAME_WEIGHT to 0.6f,
189191
OutcomeEventsTable.COLUMN_NAME_TIMESTAMP to 3333L,
192+
OutcomeEventsTable.COLUMN_NAME_SESSION_TIME to 3L,
190193
OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_INFLUENCE_TYPE to "direct",
191194
OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_IDS to "[\"notificationId3\"]",
192195
OutcomeEventsTable.COLUMN_NAME_IAM_INFLUENCE_TYPE to "direct",
@@ -205,12 +208,14 @@ class OutcomeEventsRepositoryTests : FunSpec({
205208
events[0].outcomeId shouldBe "outcomeId1"
206209
events[0].weight shouldBe 0.2f
207210
events[0].timestamp shouldBe 1111L
211+
events[0].sessionTime shouldBe 1L
208212
events[0].outcomeSource shouldNotBe null
209213
events[0].outcomeSource!!.directBody shouldBe null
210214
events[0].outcomeSource!!.indirectBody shouldBe null
211215
events[1].outcomeId shouldBe "outcomeId2"
212216
events[1].weight shouldBe 0.4f
213217
events[1].timestamp shouldBe 2222L
218+
events[1].sessionTime shouldBe 2L
214219
events[1].outcomeSource shouldNotBe null
215220
events[1].outcomeSource!!.directBody shouldBe null
216221
events[1].outcomeSource!!.indirectBody shouldNotBe null
@@ -223,6 +228,7 @@ class OutcomeEventsRepositoryTests : FunSpec({
223228
events[2].outcomeId shouldBe "outcomeId3"
224229
events[2].weight shouldBe 0.6f
225230
events[2].timestamp shouldBe 3333L
231+
events[2].sessionTime shouldBe 3L
226232
events[2].outcomeSource shouldNotBe null
227233
events[2].outcomeSource!!.indirectBody shouldBe null
228234
events[2].outcomeSource!!.directBody shouldNotBe null

0 commit comments

Comments
 (0)