Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-09 10:28:08 +0300
committerJoas Schilling <coding@schilljs.com>2021-03-09 10:28:08 +0300
commit1e9c21e0c96118b0f2b4017e4c082868cf4058be (patch)
treeee25b6ed3cd1b57053c5285961960f696feba5c4 /tests
parent12a48be1400005e44fe1dc9927a52a1ddaeb7ca7 (diff)
Fix removing yourself and promoting a stranger
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php4
-rw-r--r--tests/integration/features/conversation/one-to-one.feature4
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index 45001b263..6cb88c67d 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -1010,7 +1010,9 @@ class FeatureContext implements Context, SnippetAcceptingContext {
* @param string $apiVersion
*/
public function userPromoteDemoteInRoom(string $user, string $isPromotion, string $participant, string $identifier, int $statusCode, string $apiVersion): void {
- if (strpos($participant, 'guest') === 0) {
+ if ($participant === 'stranger') {
+ $attendeeId = 123456789;
+ } elseif (strpos($participant, 'guest') === 0) {
$sessionId = self::$userToSessionId[$participant];
$attendeeId = $this->getAttendeeId('guests', sha1($sessionId), $identifier, $statusCode === 200 ? $user : null);
} else {
diff --git a/tests/integration/features/conversation/one-to-one.feature b/tests/integration/features/conversation/one-to-one.feature
index d32c55ffc..2a07265ae 100644
--- a/tests/integration/features/conversation/one-to-one.feature
+++ b/tests/integration/features/conversation/one-to-one.feature
@@ -125,7 +125,7 @@ Feature: one-to-one
And user "participant1" is participant of room "room10" (v4)
And user "participant3" is not participant of room "room10" (v4)
And user "participant1" loads attendees attendee ids in room "room10" (v4)
- When user "participant1" promotes "participant3" in room "room10" with 404 (v4)
+ When user "participant1" promotes "stranger" in room "room10" with 404 (v4)
Scenario: User1 invites user2 to a one2one room and demote non-invited user
Given user "participant1" creates room "room11" (v4)
@@ -134,7 +134,7 @@ Feature: one-to-one
And user "participant1" is participant of room "room11" (v4)
And user "participant3" is not participant of room "room11" (v4)
And user "participant1" loads attendees attendee ids in room "room11" (v4)
- When user "participant1" demotes "participant3" in room "room11" with 404 (v4)
+ When user "participant1" demotes "stranger" in room "room11" with 404 (v4)
Scenario: User1 invites user2 to a one2one room twice, it's the same room
Given user "participant1" creates room "room12" (v4)