aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-29 23:37:10 -0500
committerGitHub <noreply@github.com>2017-12-29 23:37:10 -0500
commit041bafcceadbd5203e95f2692899ac903dd2e883 (patch)
tree9c7294cd32928a6000b04d7ce7b5a3e52cff65c5 /app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
parent32e6b5be0e662bbac22806bcc87259fd1a2e2ed0 (diff)
downloadfrost-041bafcceadbd5203e95f2692899ac903dd2e883.tar.gz
frost-041bafcceadbd5203e95f2692899ac903dd2e883.tar.bz2
frost-041bafcceadbd5203e95f2692899ac903dd2e883.zip
Feature/image retrieval (#581)v1.7.3
* Refactor * Attempt new content * Clean up to make compile friendly * Update docs
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
index da815b34..a79ccf3f 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
@@ -41,6 +41,12 @@ class FbRegexTest {
assertEquals(id, FB_MESSAGE_NOTIF_ID_MATCHER.find(data)[1]?.toLong(), "thread_fbid mismatch")
val userData = "threadlist_row_other_user_fbid_${id}thread_fbid_"
assertEquals(id, FB_MESSAGE_NOTIF_ID_MATCHER.find(userData)[1]?.toLong(), "user_fbid mismatch")
+ }
+ @Test
+ fun jsonUrlRegex() {
+ val url = "https://www.hello.world"
+ val data = "\"uri\":\"$url\"}"
+ assertEquals(url, FB_JSON_URL_MATCHER.find(data)[1])
}
} \ No newline at end of file