diff --git a/tests/acceptance/features/apiShareManagementBasic/createShare.feature b/tests/acceptance/features/apiShareManagementBasic/createShare.feature index b1dd27cbf3ee..8f9235e8e2b8 100644 --- a/tests/acceptance/features/apiShareManagementBasic/createShare.feature +++ b/tests/acceptance/features/apiShareManagementBasic/createShare.feature @@ -845,4 +845,71 @@ Feature: sharing Examples: | ocs_api_version | | 1 | - | 2 | \ No newline at end of file + | 2 | + + Scenario Outline: group names are case-sensitive, sharing with groups with different upper and lower case names + Given using OCS API version "" + And group "" has been created + And group "" has been created + And group "" has been created + And these users have been created with default attributes and without skeleton files: + | username | + | user1 | + | user2 | + | user3 | + And user "user1" has been added to group "" + And user "user2" has been added to group "" + And user "user3" has been added to group "" + When user "user0" shares file "textfile1.txt" with group "" using the sharing API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the content of file "textfile1.txt" for user "user1" should be "ownCloud test text file 1" plus end-of-line + When user "user0" shares folder "textfile2.txt" with group "" using the sharing API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the content of file "textfile2.txt" for user "user2" should be "ownCloud test text file 2" plus end-of-line + When user "user0" shares folder "textfile3.txt" with group "" using the sharing API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the content of file "textfile3.txt" for user "user3" should be "ownCloud test text file 3" plus end-of-line + Examples: + | ocs_api_version | group_id1 | group_id2 | group_id3 | ocs_status_code | + | 1 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 100 | + | 1 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 100 | + | 1 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 100 | + | 2 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 200 | + | 2 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 200 | + | 2 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 200 | + + Scenario Outline: group names are case-sensitive, sharing with non-existent groups with different upper and lower case names + Given using OCS API version "" + And these users have been created with default attributes and without skeleton files: + | username | + | user1 | + And group "" has been created + And user "user1" has been added to group "" + When user "user0" shares file "textfile1.txt" with group "" using the sharing API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the fields of the last response should include + | share_with | | + | file_target | /textfile1.txt | + | path | /textfile1.txt | + | permissions | 19 | + | uid_owner | user0 | + And the content of file "textfile1.txt" for user "user1" should be "ownCloud test text file 1" plus end-of-line + When user "user0" shares file "textfile2.txt" with group "" using the sharing API + Then the OCS status code should be "404" + And the HTTP status code should be "" + When user "user0" shares file "textfile3.txt" with group "" using the sharing API + Then the OCS status code should be "404" + And the HTTP status code should be "" + Examples: + |ocs_api_version | group_id1 | group_id2 | group_id3 | ocs_status_code | http_status_code | + | 1 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 100 | 200 | + | 1 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 100 | 200 | + | 1 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 100 | 200 | + | 2 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 200 | 404 | + | 2 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 200 | 404 | + | 2 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 200 | 404 | +