aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-31 00:56:22 -0400
committerGitHub <noreply@github.com>2017-08-31 00:56:22 -0400
commitfa00faa72c9764c72c6075e52e13df5c3561693b (patch)
tree9fc29179852098b1fb57f0ee3b2929f1c9581d64 /app/src/test/kotlin/com
parent8cc37e754cfe96470caf613728bdb6e07ac513cd (diff)
downloadfrost-fa00faa72c9764c72c6075e52e13df5c3561693b.tar.gz
frost-fa00faa72c9764c72c6075e52e13df5c3561693b.tar.bz2
frost-fa00faa72c9764c72c6075e52e13df5c3561693b.zip
Reduce scontent trimming (#245)
* Reduce scontent trimming * Update changelog
Diffstat (limited to 'app/src/test/kotlin/com')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt18
1 files changed, 12 insertions, 6 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 950be495..bb6a8467 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -14,31 +14,37 @@ class FbUrlTest {
assertEquals(expected, fbUrl.toString(), "FbUrl Mismatch:\n${fbUrl.toLogList().joinToString("\n\t")}")
}
- @Test fun base() {
+ @Test
+ fun base() {
val url = "https://touch.facebook.com/relative/?asdf=1234&hjkl=7890"
assertFbFormat(url, url)
}
- @Test fun relative() {
+ @Test
+ fun relative() {
val url = "/relative/?asdf=1234&hjkl=7890"
assertFbFormat("$FB_URL_BASE${url.substring(1)}", url)
}
- @Test fun redirect() {
+ @Test
+ fun redirect() {
assertFbFormat("${FB_URL_BASE}relative/?asdf=1234&hjkl=7890", "https://touch.facebook.com/l.php?u=${FB_URL_BASE}relative/&asdf=1234&hjkl=7890")
}
- @Test fun discard() {
+ @Test
+ fun discard() {
val prefix = "$FB_URL_BASE?test=1234"
val suffix = "&apple=notorange"
assertFbFormat("$prefix$suffix", "$prefix&ref=hello$suffix")
}
- @Test fun doubleDash() {
+ @Test
+ fun doubleDash() {
assertFbFormat("${FB_URL_BASE}relative", "$FB_URL_BASE/relative")
}
- @Test fun css() {
+ @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)