From 99dbb16a7afa17373a5c28d6d268cddf28a793f5 Mon Sep 17 00:00:00 2001 From: "Tran M. Cuong" Date: Sun, 23 Jun 2024 05:05:44 +0700 Subject: [PATCH] Fix Migrator test and also add the test to build script (#896) * Fix MigratorTest after update to Kotlin 2.0.0 * add main module's test to build script (cherry picked from commit e57638a49c759d36d25b92f26633df5bdfb0d2b3) # Conflicts: # .github/workflows/build_pull_request.yml # .github/workflows/build_push.yml --- app/src/test/java/mihon/core/migration/MigratorTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/test/java/mihon/core/migration/MigratorTest.kt b/app/src/test/java/mihon/core/migration/MigratorTest.kt index 47c4bc7c2..a805b5630 100644 --- a/app/src/test/java/mihon/core/migration/MigratorTest.kt +++ b/app/src/test/java/mihon/core/migration/MigratorTest.kt @@ -29,7 +29,7 @@ class MigratorTest { fun initilize() { migrationContext = MigrationContext(false) migrationJobFactory = spyk(MigrationJobFactory(migrationContext, CoroutineScope(Dispatchers.Main + Job()))) - migrationCompletedListener = spyk<() -> Unit>({}) + migrationCompletedListener = spyk(block = {}) migrationStrategyFactory = spyk(MigrationStrategyFactory(migrationJobFactory, migrationCompletedListener)) }