Skip to content

Commit

Permalink
add dummy initialization of Conversation
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Hibbe <[email protected]>

[skip ci]
  • Loading branch information
mahibi authored and backportbot[bot] committed Sep 6, 2024
1 parent 5e9aec1 commit deb6403
Showing 1 changed file with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit deb6403

Please sign in to comment.