Skip to content

Commit 51567c6

Browse files
committed
fix(test): Include chat-permission capability in react-permission tests
Servers that support react-permission also support chat-permission since it is an older capability. Update test setup to reflect this realistic server configuration. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
1 parent a5726c2 commit 51567c6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/src/test/java/com/nextcloud/talk/utils/ParticipantPermissionsTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class ParticipantPermissionsTest : TestCase() {
5050
@Test
5151
fun test_reactPermissionWithReactCapability() {
5252
val spreedCapability = SpreedCapability()
53-
spreedCapability.features = listOf("react-permission")
53+
// Server with react-permission also supports chat-permission
54+
spreedCapability.features = listOf("chat-permission", "react-permission")
5455
val conversation = createConversation()
5556

5657
// With react-permission capability, only REACT bit matters
@@ -73,7 +74,8 @@ class ParticipantPermissionsTest : TestCase() {
7374
@Test
7475
fun test_reactPermissionDeniedWithReactCapability() {
7576
val spreedCapability = SpreedCapability()
76-
spreedCapability.features = listOf("react-permission")
77+
// Server with react-permission also supports chat-permission
78+
spreedCapability.features = listOf("chat-permission", "react-permission")
7779
val conversation = createConversation()
7880

7981
// With react-permission capability, only CHAT but no REACT - should NOT allow reactions

0 commit comments

Comments
 (0)