diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-11 18:33:24 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-08-13 18:10:13 +0300 |
commit | f149bce242c2f94ced92c4895adb10f6b1f8c7b4 (patch) | |
tree | 75789880682499c60e826977510b96cf329e7ae8 /build | |
parent | fd1f7ccb39c7df87a69a53a6491648ab9936049e (diff) |
Add integration tests for merging received shares
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/sharing-v1.feature | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature index da6ab1d71d3..5f5e9fb21dc 100644 --- a/build/integration/features/sharing-v1.feature +++ b/build/integration/features/sharing-v1.feature @@ -608,3 +608,116 @@ Feature: sharing | /foo/ | | /foo%20(2)/ | + Scenario: Merging shares for recipient when shared from outside with group and member + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And user "user1" belongs to group "group1" + And user "user0" created a folder "merge-test-outside" + When folder "merge-test-outside" of user "user0" is shared with group "group1" + And folder "merge-test-outside" of user "user0" is shared with user "user1" + Then as "user1" the folder "merge-test-outside" exists + And as "user1" the folder "merge-test-outside (2)" does not exist + + Scenario: Merging shares for recipient when shared from outside with group and member with different permissions + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And user "user1" belongs to group "group1" + And user "user0" created a folder "merge-test-outside-perms" + When folder "merge-test-outside-perms" of user "user0" is shared with group "group1" with permissions 1 + And folder "merge-test-outside-perms" of user "user0" is shared with user "user1" with permissions 31 + Then as "user1" gets properties of folder "merge-test-outside-perms" with + |{http://owncloud.org/ns}permissions| + And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRDNVCK" + And as "user1" the folder "merge-test-outside-perms (2)" does not exist + + Scenario: Merging shares for recipient when shared from outside with two groups + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And group "group2" exists + And user "user1" belongs to group "group1" + And user "user1" belongs to group "group2" + And user "user0" created a folder "merge-test-outside-twogroups" + When folder "merge-test-outside-twogroups" of user "user0" is shared with group "group1" + And folder "merge-test-outside-twogroups" of user "user0" is shared with group "group2" + Then as "user1" the folder "merge-test-outside-twogroups" exists + And as "user1" the folder "merge-test-outside-twogroups (2)" does not exist + + Scenario: Merging shares for recipient when shared from outside with two groups with different permissions + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And group "group2" exists + And user "user1" belongs to group "group1" + And user "user1" belongs to group "group2" + And user "user0" created a folder "merge-test-outside-twogroups-perms" + When folder "merge-test-outside-twogroups-perms" of user "user0" is shared with group "group1" with permissions 1 + And folder "merge-test-outside-twogroups-perms" of user "user0" is shared with group "group2" with permissions 31 + Then as "user1" gets properties of folder "merge-test-outside-twogroups-perms" with + |{http://owncloud.org/ns}permissions| + And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRDNVCK" + And as "user1" the folder "merge-test-outside-twogroups-perms (2)" does not exist + + Scenario: Merging shares for recipient when shared from outside with two groups and member + Given As an "admin" + And user "user0" exists + And user "user1" exists + And group "group1" exists + And group "group2" exists + And user "user1" belongs to group "group1" + And user "user1" belongs to group "group2" + And user "user0" created a folder "merge-test-outside-twogroups-member-perms" + When folder "merge-test-outside-twogroups-member-perms" of user "user0" is shared with group "group1" with permissions 1 + And folder "merge-test-outside-twogroups-member-perms" of user "user0" is shared with group "group2" with permissions 31 + And folder "merge-test-outside-twogroups-member-perms" of user "user0" is shared with user "user1" with permissions 1 + Then as "user1" gets properties of folder "merge-test-outside-twogroups-member-perms" with + |{http://owncloud.org/ns}permissions| + And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRDNVCK" + And as "user1" the folder "merge-test-outside-twogroups-member-perms (2)" does not exist + + Scenario: Merging shares for recipient when shared from inside with group + Given As an "admin" + And user "user0" exists + And group "group1" exists + And user "user0" belongs to group "group1" + And user "user0" created a folder "merge-test-inside-group" + When folder "/merge-test-inside-group" of user "user0" is shared with group "group1" + Then as "user0" the folder "merge-test-inside-group" exists + And as "user0" the folder "merge-test-inside-group (2)" does not exist + + Scenario: Merging shares for recipient when shared from inside with two groups + Given As an "admin" + And user "user0" exists + And group "group1" exists + And group "group2" exists + And user "user0" belongs to group "group1" + And user "user0" belongs to group "group2" + And user "user0" created a folder "merge-test-inside-twogroups" + When folder "merge-test-inside-twogroups" of user "user0" is shared with group "group1" + And folder "merge-test-inside-twogroups" of user "user0" is shared with group "group2" + Then as "user0" the folder "merge-test-inside-twogroups" exists + And as "user0" the folder "merge-test-inside-twogroups (2)" does not exist + And as "user0" the folder "merge-test-inside-twogroups (3)" does not exist + + Scenario: Merging shares for recipient when shared from inside with group with less permissions + Given As an "admin" + And user "user0" exists + And group "group1" exists + And group "group2" exists + And user "user0" belongs to group "group1" + And user "user0" belongs to group "group2" + And user "user0" created a folder "merge-test-inside-twogroups-perms" + When folder "merge-test-inside-twogroups-perms" of user "user0" is shared with group "group1" + And folder "merge-test-inside-twogroups-perms" of user "user0" is shared with group "group2" + Then as "user0" gets properties of folder "merge-test-inside-twogroups-perms" with + |{http://owncloud.org/ns}permissions| + And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "RDNVCK" + And as "user0" the folder "merge-test-inside-twogroups-perms (2)" does not exist + And as "user0" the folder "merge-test-inside-twogroups-perms (3)" does not exist + |