From 7e93ee12c8baee27441158b8330e763c45810fe8 Mon Sep 17 00:00:00 2001 From: TPJ Schikhof Date: Tue, 9 Dec 2025 19:36:26 +0100 Subject: [PATCH] Alter tests to match new behavior --- tests/org/kde/kdeconnect/Plugin/PingPluginTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/org/kde/kdeconnect/Plugin/PingPluginTest.kt b/tests/org/kde/kdeconnect/Plugin/PingPluginTest.kt index 6cbe4072..79706f19 100644 --- a/tests/org/kde/kdeconnect/Plugin/PingPluginTest.kt +++ b/tests/org/kde/kdeconnect/Plugin/PingPluginTest.kt @@ -25,6 +25,7 @@ class PingPluginTest { val context = mockk { every { getSharedPreferences(any(), any()) } returns mockk() every { getSystemService(any()) } returns notificationManager + every { getString(any()) } returns "STRING" } val device = mockk { every { name } returns "Test Device" @@ -38,7 +39,6 @@ class PingPluginTest { mockkConstructor(NotificationCompat.Builder::class) every { anyConstructed().build() } returns mockk() plugin.setContext(context, device) - test(device, plugin, notificationManager) } } @@ -47,8 +47,8 @@ class PingPluginTest { @Test fun startPlugin() { executeWithMocks { device, plugin, notificationManager -> - plugin.startMainActivity(mockk()) - + val entries = plugin.getUiMenuEntries() + entries.single().onClick(mockk()) verify(exactly = 1) { device.sendPacket(match { np -> np.type == "kdeconnect.ping" && np.payload == null }) } } }