From 8ab7019693e7b6bb0ed387ef06e519258210bf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 4 Jan 2021 12:08:52 +0100 Subject: [PATCH] Add test for removing share MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- tests/integration/features/sharing.feature | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/integration/features/sharing.feature b/tests/integration/features/sharing.feature index 73e51ebb0..c99688bd8 100644 --- a/tests/integration/features/sharing.feature +++ b/tests/integration/features/sharing.feature @@ -110,3 +110,28 @@ Feature: File sharing Given User "user2" deletes file "/Deck/user0-file2.txt" And as "user2" the file "/Deck/user0-file2.txt" does not exist And as "user3" the file "/Deck/user0-file2.txt" exists + + Scenario: Remove a share as the owner + Given acting as user "user0" + And creates a board named "Shared board" with color "fafafa" + And create a stack named "Stack" + And create a card named "Test" + And shares the board with group "group1" + Then the HTTP status code should be "200" + + Given using new dav path + When User "user0" uploads file "../data/test.txt" to "/user0-file2.txt" + Then the HTTP status code should be "201" + Given acting as user "user0" + When share the file "/user0-file2.txt" with the card + Then the OCS status code should be "100" + And the HTTP status code should be "200" + + And as "user2" the file "/Deck/user0-file2.txt" exists + And as "user3" the file "/Deck/user0-file2.txt" exists + And as "user0" the file "/Deck/user0-file2.txt" does not exist + + Given acting as user "user0" + When Deleting last share + And as "user2" the file "/Deck/user0-file2.txt" does not exist + And as "user3" the file "/Deck/user0-file2.txt" does not exist