aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test/kotlin/com')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRequestTest.kt13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRequestTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRequestTest.kt
index 93f09fc6..9f44779f 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRequestTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRequestTest.kt
@@ -1,7 +1,9 @@
package com.pitchedapps.frost.facebook
+import com.fasterxml.jackson.databind.ObjectMapper
import com.pitchedapps.frost.facebook.requests.getAuth
import com.pitchedapps.frost.facebook.requests.getFullSizedImage
+import com.pitchedapps.frost.facebook.requests.getMenuData
import com.pitchedapps.frost.facebook.requests.markNotificationRead
import com.pitchedapps.frost.internal.AUTH
import com.pitchedapps.frost.internal.COOKIE
@@ -59,4 +61,13 @@ class FbRequestTest {
assertTrue(url?.startsWith("https://scontent") == true)
}
-} \ No newline at end of file
+ @Test
+ fun testMenu() {
+ val data = AUTH.getMenuData().invoke()
+ assertNotNull(data)
+ println(ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(data!!))
+ assertTrue(data.footer.hasContent, "Footer may be badly parsed")
+ val items = data.flatMapValid()
+ assertTrue(items.size > 15, "Something may be badly parsed")
+ }
+}