aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps/frost/facebook
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-18 23:23:56 -0500
committerAllan Wang <me@allanwang.ca>2018-01-20 16:42:37 -0500
commitd766100c297bc094491de150f24c04719ffa8f4e (patch)
treeb69863dace2fcb45d5fd25c276ca450e07305c44 /app/src/test/kotlin/com/pitchedapps/frost/facebook
parent78b3cc41e4c9f8d141ad46ee75e476fa2d177f19 (diff)
downloadfrost-d766100c297bc094491de150f24c04719ffa8f4e.tar.gz
frost-d766100c297bc094491de150f24c04719ffa8f4e.tar.bz2
frost-d766100c297bc094491de150f24c04719ffa8f4e.zip
Enhancement/speed up (#650)
* Revert back to m.facebook * Add initial speedup * Update theme * Fix link press for event status * Move web states to fb const * Fix images and email * Fix up flyweight for requests * Ensure frost request is synchronous * Prepare diff utils * Improve speed and fix blank overlay * Update comments * Add debugger and fix searchview * Theme discover pages. Resolves #654 * Fix duplicate reload * Fix image loading * Update changelog * Update tests * Rename test Update dependencies Update gitignore
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps/frost/facebook')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt16
1 files changed, 11 insertions, 5 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 79d5ea64..e508c3fe 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -20,7 +20,7 @@ class FbUrlTest {
@Test
fun base() {
- val url = "https://touch.facebook.com/relative/?asdf=1234&hjkl=7890"
+ val url = "${FB_URL_BASE}relative/?asdf=1234&hjkl=7890"
assertFbFormat(url, url)
}
@@ -62,11 +62,11 @@ class FbUrlTest {
@Test
- fun imageRegex() {
+ fun image() {
arrayOf(
- "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/229_546131_836546862_n.jpg?efg=e343J9&oh=d4245b1&oe=5453",
- "/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=...",
- "#!/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=..."
+ "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/229_546131_836546862_n.jpg?efg=e343J9&oh=d4245b1&oe=5453"
+// "/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=...",
+// "#!/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=..."
).forEach {
assertTrue(it.isImageUrl, "Failed to match image for $it")
}
@@ -84,4 +84,10 @@ class FbUrlTest {
}
+ @Test
+ fun viewFullImage() {
+ val url = "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/asdf_n.jpg?efg=asdf&oh=asdf&oe=asdf"
+ assertFbFormat(url, "#!$url")
+ }
+
} \ No newline at end of file