Skip to content

Commit c059e40

Browse files
committed
Fix compilation issue in tests.
1 parent 1532a83 commit c059e40

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import io.mockk.verify
1818
import org.junit.Test
1919
import org.junit.runner.RunWith
2020
import org.robolectric.RobolectricTestRunner
21+
import org.robolectric.RuntimeEnvironment
2122
import org.robolectric.annotation.Config
2223

2324
@RunWith(RobolectricTestRunner::class)
@@ -66,5 +67,6 @@ class NotificationChannelsTest {
6667
) = DefaultNotificationChannels(
6768
notificationManager = notificationManager,
6869
stringProvider = FakeStringProvider(),
70+
context = RuntimeEnvironment.getApplication(),
6971
)
7072
}

libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/factories/DefaultNotificationCreatorTest.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,9 @@ fun createNotificationCreator(
332332

333333
fun createNotificationChannels(): NotificationChannels {
334334
val context = RuntimeEnvironment.getApplication()
335-
return DefaultNotificationChannels(NotificationManagerCompat.from(context), FakeStringProvider(""))
335+
return DefaultNotificationChannels(
336+
notificationManager = NotificationManagerCompat.from(context),
337+
stringProvider = FakeStringProvider(""),
338+
context = context,
339+
)
336340
}

0 commit comments

Comments
 (0)