aboutsummaryrefslogtreecommitdiff
path: root/app/src/test
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-16 17:26:58 -0700
committerGitHub <noreply@github.com>2017-07-16 17:26:58 -0700
commitd90cb9b61cd2e033b46f4780ad1340c5f35b7751 (patch)
tree0294ce22bacb463c9cc95de8dc5581c1bd59a108 /app/src/test
parentc3f1fc6a8b3216442a018bb04843dfa68d738918 (diff)
downloadfrost-d90cb9b61cd2e033b46f4780ad1340c5f35b7751.tar.gz
frost-d90cb9b61cd2e033b46f4780ad1340c5f35b7751.tar.bz2
frost-d90cb9b61cd2e033b46f4780ad1340c5f35b7751.zip
Add image viewing and downloading (#63)v1.3
* Commence aggressive image caching * Add glide toggle and css url parsing * Add image hook and refractor activities * Update version analytics * Implemented imageactivity but glide will not load * Create working image loader * Finalize image view * Finalize image view logic * Remove custom cache experiment
Diffstat (limited to 'app/src/test')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt14
1 files changed, 11 insertions, 3 deletions
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 d7ec4b46..080132bd 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -1,5 +1,6 @@
package com.pitchedapps.frost.facebook
+import okhttp3.HttpUrl
import org.junit.Test
import kotlin.test.assertEquals
@@ -9,6 +10,11 @@ import kotlin.test.assertEquals
*/
class FbUrlTest {
+ fun assertFbFormat(expected: String, url: String) {
+ val fbUrl = FbUrlFormatter(url)
+ assertEquals(expected, fbUrl.toString(), "FbUrl Mismatch:\n${fbUrl.toLogList().joinToString("\n\t")}")
+ }
+
@Test
fun base() {
val url = "https://touch.facebook.com/relative/?asdf=1234&hjkl=7890"
@@ -32,8 +38,10 @@ class FbUrlTest {
assertFbFormat("$prefix$suffix", "$prefix&ref=hello$suffix")
}
- fun assertFbFormat(expected: String, url: String) {
- val fbUrl = FbUrlFormatter(url)
- assertEquals(expected, fbUrl.toString(), "FbUrl Mismatch:\n${fbUrl.toLogList().joinToString("\n\t")}")
+ @Test fun css() {
+ val expected = "https://test.com?efg=hi&oh=bye&oe=apple"
+ val orig = "https\\3a //test.com?efg\\3d hi\\26 oh\\3d bye\\26 oe\\3d apple"
+ assertFbFormat(expected, orig)
}
+
} \ No newline at end of file