aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps')
-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