From 8e4c2ddbe077eed3e4bc7990efafb9a6ef4ecac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus=20R=C3=B8rbech?= Date: Tue, 6 Aug 2024 16:07:37 +0200 Subject: [PATCH] Fix failing tests --- .../kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt | 2 +- .../io/realm/kotlin/test/mongodb/common/FunctionsTests.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 171709cb4f..323a82962a 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -2358,7 +2358,7 @@ actual object RealmInterop { } actual fun realm_app_switch_user(app: RealmAppPointer, user: RealmUserPointer) { - realm_wrapper.realm_app_switch_user(app.cptr(), user.cptr()) + checkedBooleanResult(realm_wrapper.realm_app_switch_user(app.cptr(), user.cptr())) } actual fun realm_clear_cached_apps() { diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt index 20646dd322..39fcab3ce7 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt @@ -1020,7 +1020,7 @@ class FunctionsTests { runBlocking { anonUser.logOut() } - assertFailsWithMessage("[Service][Unknown(4351)] unauthorized") { + assertFailsWithMessage("unauthorized") { runBlocking { functions.call(FIRST_ARG_FUNCTION.name, 1, 2, 3) }