diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-09-03 23:14:24 +0300 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-10-04 20:25:11 +0300 |
commit | 6d4f4c1c700ca6fb017f01c5272d48db74221f86 (patch) | |
tree | b9139fb339c662166f190d99243010877ee23de8 /build | |
parent | a7526d74ae2e5b0da4e1b27c87a42ffc81f51ef2 (diff) |
Add assorted integration tests for shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
3 files changed, 100 insertions, 0 deletions
diff --git a/build/integration/sharing_features/sharing-v1-part2.feature b/build/integration/sharing_features/sharing-v1-part2.feature index 8127e892593..5cea18b6b11 100644 --- a/build/integration/sharing_features/sharing-v1-part2.feature +++ b/build/integration/sharing_features/sharing-v1-part2.feature @@ -409,6 +409,27 @@ Feature: sharing Then the OCS status code should be "100" And the HTTP status code should be "200" + Scenario: delete a share with a user that didn't receive the share + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And file "textfile0.txt" of user "user0" is shared with user "user1" + And As an "user2" + When Deleting last share + Then the OCS status code should be "404" + And the HTTP status code should be "200" + + Scenario: delete a share with a user with resharing rights that didn't receive the share + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And file "textfile0.txt" of user "user0" is shared with user "user1" + And file "textfile0.txt" of user "user0" is shared with user "user2" + And As an "user1" + When Deleting last share + Then the OCS status code should be "404" + And the HTTP status code should be "200" + Scenario: Keep usergroup shares (#22143) Given As an "admin" And user "user0" exists diff --git a/build/integration/sharing_features/sharing-v1-part3.feature b/build/integration/sharing_features/sharing-v1-part3.feature index 7c2e66f281b..6c34534333a 100644 --- a/build/integration/sharing_features/sharing-v1-part3.feature +++ b/build/integration/sharing_features/sharing-v1-part3.feature @@ -127,6 +127,30 @@ Feature: sharing Then the OCS status code should be "997" And the HTTP status code should be "401" + Scenario: Deleting a group share as its owner + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And user "user0" belongs to group "group1" + And user "user1" belongs to group "group1" + And As an "user0" + And creating a share with + | path | welcome.txt | + | shareType | 1 | + | shareWith | group1 | + When As an "user0" + And Deleting last share + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And Getting info of last share + And the OCS status code should be "404" + And the HTTP status code should be "200" + And As an "user1" + And Getting info of last share + And the OCS status code should be "404" + And the HTTP status code should be "200" + Scenario: Deleting a group share as user Given As an "admin" And user "user0" exists @@ -337,6 +361,46 @@ Feature: sharing Then etag of element "/" of user "user1" has changed And etag of element "/PARENT" of user "user0" has not changed + Scenario: do not allow to increase permissions on received share + Given As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" created a folder "/TMP" + And As an "user0" + And creating a share with + | path | TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 17 | + When As an "user1" + And Updating last share with + | permissions | 19 | + Then the OCS status code should be "403" + And the HTTP status code should be "401" + + Scenario: do not allow to increase permissions on non received share with user with resharing rights + Given As an "admin" + And user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user0" created a folder "/TMP" + And As an "user0" + And creating a share with + | path | TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 31 | + And creating a share with + | path | TMP | + | shareType | 0 | + | shareWith | user2 | + | permissions | 17 | + When As an "user1" + And Updating last share with + | permissions | 19 | + Then the OCS status code should be "404" + And the HTTP status code should be "200" + Scenario: do not allow to increase link share permissions on reshare Given As an "admin" And user "user0" exists diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature index 37c411d987b..81c96b8be5c 100644 --- a/build/integration/sharing_features/sharing-v1.feature +++ b/build/integration/sharing_features/sharing-v1.feature @@ -305,4 +305,19 @@ Feature: sharing And User "user2" should be included in the response And User "user3" should not be included in the response + Scenario: getting all shares of a file with a user with resharing rights + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + And file "textfile0.txt" of user "user0" is shared with user "user1" + And file "textfile0.txt" of user "user0" is shared with user "user2" + And As an "user1" + When sending "GET" to "/apps/files_sharing/api/v1/shares?path=textfile0 (2).txt&reshares=true" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And User "user1" should be included in the response + And User "user2" should be included in the response + And User "user3" should not be included in the response + # See sharing-v1-part2.feature |