Browse Source

Add one more test.

pull/1385/head
Benoit Marty 1 year ago
parent
commit
040da1324d
  1. 8
      features/call/src/test/kotlin/io/element/android/features/call/CallIntentDataParserTests.kt

8
features/call/src/test/kotlin/io/element/android/features/call/CallIntentDataParserTests.kt

@ -126,4 +126,12 @@ class CallIntentDataParserTests {
val url = "io.element.call:/?url=" val url = "io.element.call:/?url="
assertThat(callIntentDataParser.parse(url)).isNull() assertThat(callIntentDataParser.parse(url)).isNull()
} }
@Test
fun `element invalid scheme returns null`() {
val embeddedUrl = "http://call.element.io/some-actual-call?with=parameters"
val encodedUrl = URLEncoder.encode(embeddedUrl, "utf-8")
val url = "bad.scheme:/?url=$encodedUrl"
assertThat(callIntentDataParser.parse(url)).isNull()
}
} }

Loading…
Cancel
Save