1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-09-20 07:31:40 +02:00

Add custom gradle function and ignore some tests

This commit is contained in:
Allan Wang 2019-01-03 23:50:46 -05:00
parent 82f79a7d36
commit a8c734070c
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56
4 changed files with 16 additions and 5 deletions

View File

@ -259,6 +259,15 @@ dependencies {
}
// Validates code and generates apk
task createGithubReleaseApk(type: GradleBuild) {
tasks = ['spotlessCheck',
'lintRelease',
'testReleaseUnitTest',
'connectedAndroidTest',
'assembleRelease']
}
def kotlinResolutions = ['kotlin-reflect',
'kotlin-stdlib',
'kotlin-stdlib-jdk7',

View File

@ -47,8 +47,6 @@ fun RequestAuth.getFullSizedImage(fbid: Long) = frostRequest(::getJsonUrl) {
get()
}
val test: () -> InputStream? = { null }
/**
* Attempts to get the fbcdn url of the supplied image redirect url
*/

View File

@ -24,11 +24,12 @@ import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.RecordedRequest
import org.junit.Assume.assumeTrue
import org.junit.Test
import java.io.File
import java.util.zip.ZipFile
import kotlin.test.AfterTest
import kotlin.test.Test
import kotlin.test.BeforeTest
import kotlin.test.Ignore
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
@ -78,6 +79,7 @@ class OfflineWebsiteTest {
)
}
@Ignore
@Test
fun fbOffline() {
// Not really a test. Skip in CI

View File

@ -23,6 +23,7 @@ import com.pitchedapps.frost.internal.USER_ID
import com.pitchedapps.frost.internal.authDependent
import okhttp3.Call
import org.junit.BeforeClass
import org.junit.Ignore
import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
@ -69,12 +70,13 @@ class FbRequestTest {
AUTH.markNotificationRead(notifId).call.assertNoError()
}
@Ignore("Broken as of 2019/01/03; however, this was never used in production to begin with")
@Test
fun fullSizeImage() {
val fbid = 10155966932992838L // google's current cover photo
val fbid = 10150706277522838L // google's current cover photo
val url = AUTH.getFullSizedImage(fbid).invoke()
println(url)
assertEquals(url?.startsWith("https://scontent"), true)
assertEquals(true, url?.startsWith("https://scontent"), "Bad start for url $url")
}
@Test