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:
authorJakob Röhrl <jakob.roehrl@web.de>2021-03-04 11:37:45 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-04 13:08:00 +0300
commit6cbe15c503058c9ef3a0525f0d9d6612fa354a88 (patch)
tree900039c2538cf8d1d05a33a5b88e584d223102b7 /tests
parent59f4f69ba5916e78a3f82377c64691a1737038b3 (diff)
Don't allow to delete other persons chats in 1-1 chats
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/chat/delete.feature31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/integration/features/chat/delete.feature b/tests/integration/features/chat/delete.feature
index 388ceee91..189a89ff0 100644
--- a/tests/integration/features/chat/delete.feature
+++ b/tests/integration/features/chat/delete.feature
@@ -146,3 +146,34 @@ Feature: chat/reply
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
+
+ Scenario: Can only delete own messages in one-to-one
+ Given user "participant1" creates room "room1"
+ | roomType | 1 |
+ | invite | participant2 |
+ And user "participant1" sends message "Message 1" to room "room1" with 201
+ And user "participant2" sends message "Message 2" to room "room1" with 201
+ Then user "participant1" sees the following messages in room "room1" with 200
+ | room | actorType | actorId | actorDisplayName | message | messageParameters |
+ | room1 | users | participant2 | participant2-displayname | Message 2 | [] |
+ | room1 | users | participant1 | participant1-displayname | Message 1 | [] |
+ Then user "participant2" sees the following messages in room "room1" with 200
+ | room | actorType | actorId | actorDisplayName | message | messageParameters |
+ | room1 | users | participant2 | participant2-displayname | Message 2 | [] |
+ | room1 | users | participant1 | participant1-displayname | Message 1 | [] |
+ And user "participant1" deletes message "Message 2" from room "room1" with 403
+ And user "participant2" deletes message "Message 1" from room "room1" with 403
+ Then user "participant1" sees the following messages in room "room1" with 200
+ | room | actorType | actorId | actorDisplayName | message | messageParameters |
+ | room1 | users | participant2 | participant2-displayname | Message 2 | [] |
+ | room1 | users | participant1 | participant1-displayname | Message 1 | [] |
+ And user "participant1" deletes message "Message 1" from room "room1" with 200
+ And user "participant2" deletes message "Message 2" from room "room1" with 200
+ Then user "participant1" sees the following messages in room "room1" with 200
+ | room | actorType | actorId | actorDisplayName | message | messageParameters |
+ | room1 | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} |
+ | room1 | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
+ Then user "participant2" sees the following messages in room "room1" with 200
+ | room | actorType | actorId | actorDisplayName | message | messageParameters |
+ | room1 | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} |
+ | room1 | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |