Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunkup committed Jan 14, 2025
1 parent aaacdd2 commit 7f58df8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/src/androidTest/kotlin/at/bitfire/davdroid/TestModules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ import at.bitfire.davdroid.push.PushRegistrationWorkerManager
import at.bitfire.davdroid.repository.DavCollectionRepository
import at.bitfire.davdroid.startup.StartupPlugin
import at.bitfire.davdroid.startup.TasksAppWatcher
import at.bitfire.davdroid.sync.worker.SyncWorkerManager
import dagger.Module
import dagger.hilt.components.SingletonComponent
import dagger.hilt.testing.TestInstallIn
import dagger.multibindings.Multibinds

// remove SyncWorkerModule from Android tests
@Module
@TestInstallIn(
components = [SingletonComponent::class],
replaces = [SyncWorkerManager.SyncWorkerManagerModule::class]
)
abstract class TestSyncWorkerManagerModule {
// provides empty set of listeners
@Multibinds
abstract fun empty(): Set<DavCollectionRepository.OnChangeListener>
}

// remove PushRegistrationWorkerModule from Android tests
@Module
@TestInstallIn(
Expand Down

0 comments on commit 7f58df8

Please sign in to comment.