aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-11-15 02:47:13 -0500
committerGitHub <noreply@github.com>2017-11-15 02:47:13 -0500
commit5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a (patch)
treebe77ea3de84f549a612e22a0adb8785956e0ac56 /app/src/test/kotlin/com/pitchedapps
parent98fb870bdabae28beabe99d1e49ad74ab9a5a1c2 (diff)
downloadfrost-5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a.tar.gz
frost-5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a.tar.bz2
frost-5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a.zip
Fix/bad overlay (#490)v1.6.5
* Fix intent launching * Add some tests and update kotlin
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt
new file mode 100644
index 00000000..4062cf98
--- /dev/null
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt
@@ -0,0 +1,27 @@
+package com.pitchedapps.frost.utils
+
+import com.pitchedapps.frost.facebook.FACEBOOK_COM
+import org.junit.Test
+import kotlin.test.assertFalse
+import kotlin.test.assertTrue
+
+/**
+ * Created by Allan Wang on 2017-11-15.
+ */
+class UrlTests {
+
+ val GOOGLE = "https://www.google.ca"
+
+ @Test
+ fun independence() {
+ assertTrue(GOOGLE.isIndependent, "google")
+ assertTrue(FACEBOOK_COM.isIndependent, "facebook")
+ assertFalse("#!/photos/viewer/?photoset_token=pcb.1234".isIndependent, "photo")
+ }
+
+ @Test
+ fun isFacebook() {
+ assertFalse(GOOGLE.isFacebookUrl, "google")
+ assertTrue(FACEBOOK_COM.isFacebookUrl, "facebook")
+ }
+} \ No newline at end of file