From 5a6bf455cb2e550c18f94d8aeaaa91c2260cb75a Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 15 Nov 2017 02:47:13 -0500 Subject: Fix/bad overlay (#490) * Fix intent launching * Add some tests and update kotlin --- .../kotlin/com/pitchedapps/frost/utils/UrlTests.kt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt (limited to 'app/src/test/kotlin/com') 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 -- cgit v1.2.3