1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 20:12:39 +01:00

Update some tests

This commit is contained in:
Allan Wang 2019-04-25 15:43:38 -07:00
parent 77d28c77ea
commit b8ab09e645
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56
2 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import com.pitchedapps.frost.internal.assertComponentsNotEmpty
import com.pitchedapps.frost.internal.assertDescending
import com.pitchedapps.frost.internal.authDependent
import org.junit.BeforeClass
import org.junit.Ignore
import org.junit.Test
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
@ -64,6 +65,7 @@ class FbParseTest {
@Test
fun messageUser() = MessageParser.queryUser(COOKIE, "allan").test("allan query")
@Ignore("No longer works as search results don't appear in html")
@Test
fun search() = SearchParser.test()

View File

@ -59,7 +59,7 @@ val AUTH: RequestAuth by lazy {
}
}
val VALID_COOKIE: Boolean by lazy {
private val VALID_COOKIE: Boolean by lazy {
val data = testJsoup(FbItem.SETTINGS.url)
data.title() == "Settings"
}
@ -68,7 +68,8 @@ fun testJsoup(url: String) = frostJsoup(COOKIE, url)
fun authDependent() {
println("Auth Dependent")
Assume.assumeTrue(COOKIE.isNotEmpty() && VALID_COOKIE)
Assume.assumeTrue("Cookie cannot be empty", COOKIE.isNotEmpty())
Assume.assumeTrue("Cookie is not valid", VALID_COOKIE)
}
/**