aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-03-11 19:24:32 -0400
committerGitHub <noreply@github.com>2018-03-11 19:24:32 -0400
commitfe51373f5a95323d64f6d966888a2c6c62a36deb (patch)
tree328bf7ab5bf00f01e070e9d84ff71cac59b0ecf1 /app/src/test/kotlin/com
parent67988a25d83fc10b187fcc821c3ceacfad0195d5 (diff)
downloadfrost-fe51373f5a95323d64f6d966888a2c6c62a36deb.tar.gz
frost-fe51373f5a95323d64f6d966888a2c6c62a36deb.tar.bz2
frost-fe51373f5a95323d64f6d966888a2c6c62a36deb.zip
Enhancement/debug mode (#779)
* Update changelog * Improve debugger * Remove need for mapping urls * Remove excess logs * Clean up
Diffstat (limited to 'app/src/test/kotlin/com')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt16
2 files changed, 17 insertions, 1 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
index 9fbb6069..e30ec174 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
@@ -15,7 +15,7 @@ class OfflineWebsiteTest {
fun basic() {
val countdown = CountDownLatch(1)
val buildPath = if (File(".").parentFile?.name == "app") "build/offline_test" else "app/build/offline_test"
- OfflineWebsite(FB_URL_BASE, COOKIE, File(buildPath))
+ OfflineWebsite(FB_URL_BASE, COOKIE, baseDir = File(buildPath))
.loadAndZip("test") {
println("Outcome $it")
countdown.countDown()
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt
new file mode 100644
index 00000000..86bd4ce5
--- /dev/null
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt
@@ -0,0 +1,16 @@
+package com.pitchedapps.frost.utils
+
+import org.junit.Test
+import kotlin.test.assertEquals
+
+/**
+ * Created by Allan Wang on 11/03/18.
+ */
+class StringEscapeUtilsTest {
+
+ @Test
+ fun utf() {
+ val escaped = "\\u003Chead&gt; color=\\\"#3b5998\\\""
+ assertEquals("<head> color=\"#3b5998\"", escaped.unescapeHtml())
+ }
+} \ No newline at end of file