aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-04-12 18:50:58 -0400
committerGitHub <noreply@github.com>2018-04-12 18:50:58 -0400
commitd9e2562267e549ee407e683262406581f2c4888e (patch)
tree0dc063913b00a9dc4f10d0d5c7085218c2cc17c3 /app/src/test/kotlin
parent42e57597bcc3216778e9f14389f751eb62da1bd5 (diff)
downloadfrost-d9e2562267e549ee407e683262406581f2c4888e.tar.gz
frost-d9e2562267e549ee407e683262406581f2c4888e.tar.bz2
frost-d9e2562267e549ee407e683262406581f2c4888e.zip
Misc (#865)
* Clean up git code * Update download link * Update theme * Reorder settings, resolvees #856 * Do not log undeliverable exception * Handle potential lack of webview * Set notification epoch default to now, resolves #857 * Fix notification epoch time init * Update changelog * Update theme * Add slack url, resolves #880 * Prepare for image update
Diffstat (limited to 'app/src/test/kotlin')
-rw-r--r--app/src/test/kotlin/android/util/Log.java12
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt8
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/services/UpdateServiceTest.kt18
3 files changed, 13 insertions, 25 deletions
diff --git a/app/src/test/kotlin/android/util/Log.java b/app/src/test/kotlin/android/util/Log.java
index e7095563..a2f431ed 100644
--- a/app/src/test/kotlin/android/util/Log.java
+++ b/app/src/test/kotlin/android/util/Log.java
@@ -32,22 +32,22 @@ public class Log {
return 0;
}
- public static int println(int priority, String tag, String message) {
+ public static int println(int priority, String tag, String msg) {
switch (priority) {
case VERBOSE:
- p("V", tag, message);
+ p("V", tag, msg);
break;
case INFO:
- p("I", tag, message);
+ p("I", tag, msg);
break;
case DEBUG:
- p("D", tag, message);
+ p("D", tag, msg);
break;
case ERROR:
- p("E", tag, message);
+ p("E", tag, msg);
break;
default:
- p("L " + priority, tag, message);
+ p("L " + priority, tag, msg);
break;
}
return 0;
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
index e508c3fe..0e45d2f2 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -42,7 +42,7 @@ class FbUrlTest {
*/
@Test
fun queryConversion() {
- val url = "https://m.facebook.com/l.php?u=https%3A%2F%2Fgoogle.ca&h=hi"
+ val url = "${FB_URL_BASE}l.php?u=https%3A%2F%2Fgoogle.ca&h=hi"
val expected = "https://google.ca?h=hi"
assertFbFormat(expected, url)
}
@@ -90,4 +90,10 @@ class FbUrlTest {
assertFbFormat(url, "#!$url")
}
+// @Test
+// fun viewFullImageIndirect() {
+// val urlBase = "photo/view_full_size/?fbid=1234&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=13&_ft_=qid.1234%3Amf_story_key.1234%3Atop_level_post_id"
+// assertFbFormat("$FB_URL_BASE$urlBase", "#!/$urlBase")
+// }
+
} \ No newline at end of file
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/services/UpdateServiceTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/services/UpdateServiceTest.kt
deleted file mode 100644
index 69ff7941..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/services/UpdateServiceTest.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.pitchedapps.frost.services
-
-import org.junit.Test
-import kotlin.test.assertNotNull
-
-/**
- * Created by Allan Wang on 07/04/18.
- */
-class UpdateServiceTest {
-
- @Test
- fun getRelease() {
- val release = UpdateManager.getLatestGithubRelease()
- assertNotNull(release)
- assertNotNull(release!!.apk, "Apk not uploaded for $release")
- }
-
-} \ No newline at end of file