diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-11-26 18:28:08 -0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-03 08:10:27 +0100 |
commit | ccf7d87c11112b63851940a6b157f07f954bd9ef (patch) | |
tree | 99b0cceece725133f05141b4c3efb5e993cc2268 /build | |
parent | 5794f14df905380cb179cc8eb13dec60d96dfcc6 (diff) | |
download | nextcloud-server-ccf7d87c11112b63851940a6b157f07f954bd9ef.tar.gz nextcloud-server-ccf7d87c11112b63851940a6b157f07f954bd9ef.zip |
integration tests
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
add tests on non-owner pov
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
duplicate
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
small fixes
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
removed tags
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/sharing_features/sharing-v1.feature | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature index 37bbe620caf..e70c98c5b66 100644 --- a/build/integration/sharing_features/sharing-v1.feature +++ b/build/integration/sharing_features/sharing-v1.feature @@ -322,4 +322,84 @@ Feature: sharing And User "user2" should be included in the response And User "user3" should not be included in the response + Scenario: getting inherited shares of a file + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + # will be shared with user1 + And User "user0" created a folder "/first" + # will be shared with user1, user2 + And User "user0" created a folder "/first/second" + # will be shared with user1, user3 + And User "user0" uploads file "data/textfile.txt" to "/first/test1.txt" + # will be shared with user1, user2, user3 + And User "user0" uploads file "data/textfile.txt" to "/first/second/test2.txt" + And As an "user0" + And creating a share with + | path | /first | + | shareType | 0 | + | shareWith | user1 | + | permissions | 16 | + And As an "user1" + And accepting last share +# And folder "first" of user "user0" is shared with user "user1" +# And creating a share with +# | path | /first/second | +# | shareType | 0 | +# | shareWith | user2 | +# | permissions | 16 | + And folder "first/second" of user "user0" is shared with user "user2" +# And As an "user1" +# And creating a share with +# | path | /first/test1.txt | +# | shareType | 0 | +# | shareWith | user3 | +# | permissions | 8 | + And file "first/test1.txt" of user "user0" is shared with user "user3" +# And As an "user2" +# And creating a share with +# | path | /second/test2.txt | +# | shareType | 0 | +# | shareWith | user3 | +# | permissions | 8 | + And file "first/second/test2.txt" of user "user0" is shared with user "user3" + # get inherited shares from the owner PoV + And As an "user0" + When sending "GET" to "/apps/files_sharing/api/v1/shares/inherited?path=first/second/test2.txt" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And User "user0" should not be included in the response + And User "user1" should be included in the response + And User "user2" should be included in the response + And User "user3" should be included in the response + When sending "GET" to "/apps/files_sharing/api/v1/shares/inherited?path=first/test1.txt" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And User "user0" should not be included in the response + And User "user1" should be included in the response + And User "user2" should not be included in the response + And User "user3" should be included in the response + # get inherited shares from the a user with no shares rights + And As an "user2" + When sending "GET" to "/apps/files_sharing/api/v1/shares/inherited?path=first/test1.txt" + Then the OCS status code should be "404" + And the HTTP status code should be "200" + # get inherited shares from the PoV of a user with resharing rights (user1) + And As an "user1" + When sending "GET" to "/apps/files_sharing/api/v1/shares/inherited?path=first/second/test2.txt" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And User "user0" should not be included in the response + And User "user1" should not be included in the response + And User "user2" should be included in the response + And User "user3" should be included in the response + When sending "GET" to "/apps/files_sharing/api/v1/shares/inherited?path=first/test1.txt" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And User "user0" should not be included in the response + And User "user1" should not be included in the response + And User "user2" should not be included in the response + And User "user3" should be included in the response + # See sharing-v1-part2.feature |