Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 1c403d17 authored by Sunik Kupfer's avatar Sunik Kupfer Committed by Ricki Hirner
Browse files

Fix test (bitfireAT/davx5#320)

parent 81273f02
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)