From cb228d35e954764209679be51a94defd78ee8488 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 7 Oct 2025 16:49:51 +0200 Subject: [PATCH] Fix compilation issue in tests. --- .../impl/notifications/channels/NotificationChannelsTest.kt | 2 ++ .../factories/DefaultNotificationCreatorTest.kt | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt index a6b8bc9985..b93bbcaf15 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt @@ -18,6 +18,7 @@ import io.mockk.verify import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config @RunWith(RobolectricTestRunner::class) @@ -66,5 +67,6 @@ class NotificationChannelsTest { ) = DefaultNotificationChannels( notificationManager = notificationManager, stringProvider = FakeStringProvider(), + context = RuntimeEnvironment.getApplication(), ) } diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/factories/DefaultNotificationCreatorTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/factories/DefaultNotificationCreatorTest.kt index 5fd1b6386e..7786fb261e 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/factories/DefaultNotificationCreatorTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/factories/DefaultNotificationCreatorTest.kt @@ -332,5 +332,9 @@ fun createNotificationCreator( fun createNotificationChannels(): NotificationChannels { val context = RuntimeEnvironment.getApplication() - return DefaultNotificationChannels(NotificationManagerCompat.from(context), FakeStringProvider("")) + return DefaultNotificationChannels( + notificationManager = NotificationManagerCompat.from(context), + stringProvider = FakeStringProvider(""), + context = context, + ) }