summaryrefslogtreecommitdiff
path: root/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java')
-rw-r--r--src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java b/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
index 08fd0d486..fa99303b1 100644
--- a/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
+++ b/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
@@ -32,7 +32,7 @@ public class URLCheckerTest extends AndroidTestCase {
assertEquals("http://example.com", out);
}
- public void testPcastProtocol() {
+ public void testPcastProtocolNoScheme() {
final String in = "pcast://example.com";
final String out = URLChecker.prepareURL(in);
assertEquals("http://example.com", out);
@@ -55,4 +55,22 @@ public class URLCheckerTest extends AndroidTestCase {
final String out = URLChecker.prepareURL(in);
assertEquals("http://example.com", out);
}
+
+ public void testAntennaPodSubscribeProtocolNoScheme() throws Exception {
+ final String in = "antennapod-subscribe://example.com";
+ final String out = URLChecker.prepareURL(in);
+ assertEquals("http://example.com", out);
+ }
+
+ public void testPcastProtocolWithScheme() {
+ final String in = "pcast://https://example.com";
+ final String out = URLChecker.prepareURL(in);
+ assertEquals("https://example.com", out);
+ }
+
+ public void testAntennaPodSubscribeProtocolWithScheme() throws Exception {
+ final String in = "antennapod-subscribe://https://example.com";
+ final String out = URLChecker.prepareURL(in);
+ assertEquals("https://example.com", out);
+ }
}