mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-23 19:50:18 +00:00
Fix test (bitfireAT/davx5#320)
This commit is contained in:
parent
81273f028e
commit
1c403d171c
|
@ -20,6 +20,7 @@ import at.bitfire.davdroid.db.AppDatabase
|
|||
import at.bitfire.davdroid.db.Credentials
|
||||
import at.bitfire.davdroid.resource.TaskUtils
|
||||
import at.bitfire.davdroid.servicedetection.DavResourceFinder
|
||||
import at.bitfire.davdroid.servicedetection.RefreshCollectionsWorker
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.settings.Settings
|
||||
import at.bitfire.davdroid.settings.SettingsManager
|
||||
|
@ -172,6 +173,10 @@ class AccountDetailsFragmentTest {
|
|||
every { ContentResolver.setIsSyncable(any(), any(), any()) } returns Unit
|
||||
every { ContentResolver.getIsSyncable(any(), any()) } returns 1
|
||||
|
||||
// Create account will try to start an initial collection refresh, which we don't need, so we mockk it
|
||||
mockkObject(RefreshCollectionsWorker.Companion)
|
||||
every { RefreshCollectionsWorker.refreshCollections(any(), any()) } returns ""
|
||||
|
||||
// Create account -> should also set tasks sync interval in settings
|
||||
val accountCreated = AccountDetailsFragment.Model(targetContext, db, settingsManager)
|
||||
.createAccount(accountName, fakeCredentials, config, GroupMethod.GROUP_VCARDS)
|
||||
|
|
Loading…
Reference in a new issue