Bump dependencies

This commit is contained in:
len
2016-06-15 13:18:27 +02:00
parent a475ecec4d
commit b1d7167112
4 changed files with 12 additions and 36 deletions

View File

@ -94,18 +94,6 @@ class LibraryUpdateAlarmTest {
assertThat(expectedIntent.action).isEqualTo(pendingIntent.savedIntents[0].action)
}
@Test
fun testLibraryUpdateServiceIsStartedWhenUpdateIntentIsReceived() {
val intent = Intent(context, LibraryUpdateService::class.java)
intent.putExtra("is_manual", false)
assertThat(app.nextStartedService).isNotEqualTo(intent)
val alarm = LibraryUpdateAlarm()
alarm.onReceive(context, Intent(LibraryUpdateAlarm.LIBRARY_UPDATE_ACTION))
assertThat(app.nextStartedService).isEqualTo(intent)
}
@Test
fun testReceiverDoesntReactToNullActions() {
val prefs = PreferencesHelper(context)
@ -128,7 +116,9 @@ class LibraryUpdateAlarmTest {
val shouldRunAt = SystemClock.elapsedRealtime() + hours * 60 * 60 * 1000
// Margin error of 3 seconds
assertThat(alarmManager.nextScheduledAlarm.triggerAtTime).isGreaterThan(shouldRunAt - 3000).isLessThan(shouldRunAt + 3000)
assertThat(alarmManager.nextScheduledAlarm.triggerAtTime)
.isGreaterThan(shouldRunAt - 3000)
.isLessThan(shouldRunAt + 3000)
}
}

View File

@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.data.library
import android.app.Application
import android.content.Context
import android.os.Build
import eu.kanade.tachiyomi.AppModule
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner
@ -29,7 +28,7 @@ import uy.kohesive.injekt.api.addSingleton
import uy.kohesive.injekt.registry.default.DefaultRegistrar
import java.util.*
@Config(constants = BuildConfig::class, sdk = intArrayOf(Build.VERSION_CODES.LOLLIPOP))
@Config(constants = BuildConfig::class)
@RunWith(CustomRobolectricGradleTestRunner::class)
class LibraryUpdateServiceTest {
@ -62,8 +61,6 @@ class LibraryUpdateServiceTest {
@Test
fun testLifecycle() {
println(service.db)
// Smoke test
Robolectric.buildService(LibraryUpdateService::class.java)
.attach()
@ -75,8 +72,6 @@ class LibraryUpdateServiceTest {
@Test
fun testUpdateManga() {
println(service.db)
val manga = createManga("/manga1")[0]
manga.id = 1L
service.db.insertManga(manga).executeAsBlocking()
@ -93,7 +88,6 @@ class LibraryUpdateServiceTest {
@Test
fun testContinuesUpdatingWhenAMangaFails() {
var favManga = createManga("/manga1", "/manga2", "/manga3")
println(service.db)
service.db.insertMangas(favManga).executeAsBlocking()
favManga = service.db.getFavoriteMangas().executeAsBlocking()