mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-04 09:33:18 +03:00
fixed CI
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
54a8b4224c
commit
85e3ccddd4
2 changed files with 25 additions and 23 deletions
|
@ -93,11 +93,11 @@ android {
|
|||
buildConfigField "String", "PERMISSION_LOCAL_BROADCAST", "\"${localBroadcastPermission}\""
|
||||
}
|
||||
|
||||
// testOptions {
|
||||
// unitTests.all {
|
||||
// useJUnitPlatform()
|
||||
// }
|
||||
// }
|
||||
testOptions {
|
||||
unitTests.all {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
package com.nextcloud.talk.utils
|
||||
|
||||
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 junit.framework.TestCase
|
||||
|
@ -22,23 +24,23 @@ class ParticipantPermissionsTest : TestCase() {
|
|||
ParticipantPermissions.JOIN_CALL or
|
||||
ParticipantPermissions.DEFAULT
|
||||
|
||||
/**
|
||||
* val attendeePermissions =
|
||||
* ParticipantPermissions(
|
||||
* spreedCapability,
|
||||
* conversation
|
||||
* )
|
||||
*
|
||||
* assert(attendeePermissions.canPublishScreen)
|
||||
* assert(attendeePermissions.canJoinCall)
|
||||
* assert(attendeePermissions.isDefault)
|
||||
*
|
||||
* assertFalse(attendeePermissions.isCustom)
|
||||
* assertFalse(attendeePermissions.canStartCall())
|
||||
* assertFalse(attendeePermissions.canIgnoreLobby())
|
||||
* assertTrue(attendeePermissions.canPublishAudio())
|
||||
* assertTrue(attendeePermissions.canPublishVideo())
|
||||
*/
|
||||
assertTrue(true)
|
||||
val user = User()
|
||||
user.id = 1
|
||||
|
||||
val attendeePermissions =
|
||||
ParticipantPermissions(
|
||||
spreedCapability,
|
||||
ConversationModel.mapToConversationModel(conversation, user)
|
||||
)
|
||||
|
||||
assert(attendeePermissions.canPublishScreen)
|
||||
assert(attendeePermissions.canJoinCall)
|
||||
assert(attendeePermissions.isDefault)
|
||||
|
||||
assertFalse(attendeePermissions.isCustom)
|
||||
assertFalse(attendeePermissions.canStartCall())
|
||||
assertFalse(attendeePermissions.canIgnoreLobby())
|
||||
assertTrue(attendeePermissions.canPublishAudio())
|
||||
assertTrue(attendeePermissions.canPublishVideo())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue