From da62c7a21a81f513988fa64df6253376f85228ef Mon Sep 17 00:00:00 2001 From: "Cuong M. Tran" Date: Fri, 7 Jun 2024 04:35:26 +0700 Subject: [PATCH] Fix MigratorTest after update to io.mockk v1.13.11 (#814) * Fix MigratorTest after update to io.mockk v1.13.11 Causing error: io.mockk.MockKException: was not can only be called on a mocked object * remove import --- app/src/test/java/mihon/core/migration/MigratorTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/test/java/mihon/core/migration/MigratorTest.kt b/app/src/test/java/mihon/core/migration/MigratorTest.kt index e0feff3fd..47c4bc7c2 100644 --- a/app/src/test/java/mihon/core/migration/MigratorTest.kt +++ b/app/src/test/java/mihon/core/migration/MigratorTest.kt @@ -1,6 +1,5 @@ package mihon.core.migration -import io.mockk.Called import io.mockk.slot import io.mockk.spyk import io.mockk.verify @@ -59,7 +58,7 @@ class MigratorTest { val result = execute.await() assertFalse(result) - verify { migrationJobFactory.create(any()) wasNot Called } + verify(exactly = 0) { migrationJobFactory.create(any()) } } @Test @@ -72,7 +71,7 @@ class MigratorTest { val result = execute.await() assertFalse(result) - verify { migrationJobFactory.create(any()) wasNot Called } + verify(exactly = 0) { migrationJobFactory.create(any()) } } @Test