Loading app/src/androidTest/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragmentTest.kt +5 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading
app/src/androidTest/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragmentTest.kt +5 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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