aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-26 03:37:32 -0500
committerAllan Wang <me@allanwang.ca>2017-12-26 03:39:28 -0500
commit1769dbcef9786b847ffeaebdf6ecced45da9222c (patch)
tree50f543469607b608c0b62ca8a63c6a65325802b9 /app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
parent8080d43dbd9a6863fadb86594b179d0919d6215b (diff)
downloadfrost-1.7.2.tar.gz
frost-1.7.2.tar.bz2
frost-1.7.2.zip
Enhancement/fb requests (#575)v1.7.2
* Update lambdas to references * Simplify regex and parsers * Fix some parsing and add more tests * Improve message parser and tests * Simplify parser * Shorten interfaces * Push rem * Create notification parser * Clean up notification service * Clean up notification service * Add safe cookie fallback * Fix cookie reference * Make parsers only hold cookie string * Clean up cookie references * Fix up login and event theme * Update changelog Remove workspace backup
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
index 61c69c40..ecebed04 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
@@ -1,6 +1,8 @@
package com.pitchedapps.frost.parsers
+import com.pitchedapps.frost.facebook.FB_EPOCH_MATCHER
import com.pitchedapps.frost.facebook.formattedFbUrl
+import com.pitchedapps.frost.facebook.get
import org.junit.Test
import kotlin.test.assertEquals
@@ -15,7 +17,7 @@ class MessageParserTest {
@Test
fun parseEpoch() {
val input = "{\"time\":1507301642,\"short\":true,\"forceseconds\":false}"
- assertEquals(1507301642, FrostRegex.epoch.find(input)!!.groupValues[1].toLong())
+ assertEquals(1507301642, FB_EPOCH_MATCHER.find(input)[1]!!.toLong())
}
@Test