diff --git a/app/src/test/java/com/nextcloud/talk/utils/ParticipantPermissionsTest.kt b/app/src/test/java/com/nextcloud/talk/utils/ParticipantPermissionsTest.kt index 3cb84fba90..0e39963f71 100644 --- a/app/src/test/java/com/nextcloud/talk/utils/ParticipantPermissionsTest.kt +++ b/app/src/test/java/com/nextcloud/talk/utils/ParticipantPermissionsTest.kt @@ -11,6 +11,8 @@ import com.nextcloud.talk.data.user.model.User import com.nextcloud.talk.models.domain.ConversationModel import com.nextcloud.talk.models.json.capabilities.SpreedCapability import com.nextcloud.talk.models.json.conversations.Conversation +import com.nextcloud.talk.models.json.conversations.ConversationEnums +import com.nextcloud.talk.models.json.participants.Participant import junit.framework.TestCase import org.junit.Test @@ -19,7 +21,53 @@ class ParticipantPermissionsTest : TestCase() { @Test fun test_areFlagsSet() { val spreedCapability = SpreedCapability() - val conversation = Conversation(null, null) + val conversation = Conversation( + token = "test", + name = "test", + displayName = "test", + description = "test", + type = ConversationEnums.ConversationType.DUMMY, + lastPing = 1, + participantType = Participant.ParticipantType.DUMMY, + hasPassword = true, + sessionId = "test", + actorId = "test", + actorType = "test", + password = "test", + favorite = false, + lastActivity = 1, + unreadMessages = 1, + unreadMention = false, + lastMessage = null, + objectType = ConversationEnums.ObjectType.DEFAULT, + notificationLevel = ConversationEnums.NotificationLevel.ALWAYS, + conversationReadOnlyState = ConversationEnums.ConversationReadOnlyState.CONVERSATION_READ_WRITE, + lobbyState = ConversationEnums.LobbyState.LOBBY_STATE_ALL_PARTICIPANTS, + lobbyTimer = 1, + lastReadMessage = 1, + lastCommonReadMessage = 1, + hasCall = true, + callFlag = 1, + canStartCall = false, + canLeaveConversation = true, + canDeleteConversation = true, + unreadMentionDirect = true, + notificationCalls = 1, + permissions = 1, + messageExpiration = 1, + status = "test", + statusIcon = "test", + statusMessage = "test", + statusClearAt = 1, + callRecording = 1, + avatarVersion = "test", + hasCustomAvatar = true, + callStartTime = 1, + recordingConsentRequired = 1, + remoteServer = "", + remoteToken = "" + ) + conversation.permissions = ParticipantPermissions.PUBLISH_SCREEN or ParticipantPermissions.JOIN_CALL or ParticipantPermissions.DEFAULT