diff options
author | Allan Wang <me@allanwang.ca> | 2017-11-15 02:47:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 02:47:13 -0500 |
commit | 5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a (patch) | |
tree | be77ea3de84f549a612e22a0adb8785956e0ac56 /app/src/test | |
parent | 98fb870bdabae28beabe99d1e49ad74ab9a5a1c2 (diff) | |
download | frost-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')
-rw-r--r-- | app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt | 27 |
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 |