diff --git a/appnav/src/test/kotlin/io/element/android/appnav/intent/IntentResolverTest.kt b/appnav/src/test/kotlin/io/element/android/appnav/intent/IntentResolverTest.kt index 0a0b507742..aa0fe9cbf1 100644 --- a/appnav/src/test/kotlin/io/element/android/appnav/intent/IntentResolverTest.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/intent/IntentResolverTest.kt @@ -209,13 +209,33 @@ class IntentResolverTest { permalinkParserResult = { permalinkData } ) val intent = Intent(RuntimeEnvironment.getApplication(), Activity::class.java).apply { - action = Intent.ACTION_SEND + action = Intent.ACTION_BATTERY_LOW data = "https://matrix.to/invalid".toUri() } val result = sut.resolve(intent) assertThat(result).isNull() } + @Test + fun `test incoming share simple`() { + val sut = createIntentResolver() + val intent = Intent(RuntimeEnvironment.getApplication(), Activity::class.java).apply { + action = Intent.ACTION_SEND + } + val result = sut.resolve(intent) + assertThat(result).isEqualTo(ResolvedIntent.IncomingShare(intent = intent)) + } + + @Test + fun `test incoming share multiple`() { + val sut = createIntentResolver() + val intent = Intent(RuntimeEnvironment.getApplication(), Activity::class.java).apply { + action = Intent.ACTION_SEND_MULTIPLE + } + val result = sut.resolve(intent) + assertThat(result).isEqualTo(ResolvedIntent.IncomingShare(intent = intent)) + } + @Test fun `test resolve invalid`() { val sut = createIntentResolver(