From c259d5b4ac45cf0e83ce5877345a761dd3641ab6 Mon Sep 17 00:00:00 2001 From: Mai-LinhC Date: Fri, 3 May 2024 17:39:05 +0200 Subject: [PATCH] fix: epic --- .../androidTest/java/com/github/se/assocify/Epic1Test.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/androidTest/java/com/github/se/assocify/Epic1Test.kt b/app/src/androidTest/java/com/github/se/assocify/Epic1Test.kt index 4687478da..d03e5f39b 100644 --- a/app/src/androidTest/java/com/github/se/assocify/Epic1Test.kt +++ b/app/src/androidTest/java/com/github/se/assocify/Epic1Test.kt @@ -22,6 +22,8 @@ import com.github.se.assocify.model.database.EventAPI import com.github.se.assocify.model.database.TaskAPI import com.github.se.assocify.model.database.UserAPI import com.github.se.assocify.model.entities.Association +import com.github.se.assocify.model.entities.PermissionRole +import com.github.se.assocify.model.entities.RoleType import com.github.se.assocify.model.entities.User import com.github.se.assocify.model.localsave.LoginSave import com.github.se.assocify.navigation.Destination @@ -112,6 +114,12 @@ class Epic1Test : TestCase(kaspressoBuilder = Kaspresso.Builder.withComposeSuppo val onSuccessCallback = firstArg<(List) -> Unit>() onSuccessCallback.invoke(listOf(asso)) } + + every { getCurrentUserRole(any(), any()) } answers + { + val onSuccessCallback = firstArg<(PermissionRole) -> Unit>() + onSuccessCallback.invoke(PermissionRole("1", "aaa", RoleType.PRESIDENCY)) + } } private val eventAPI = mockk() { every { getEvents(any(), any()) } answers {} }