1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-23 23:29:02 +03:00
Files
ocis/tests/acceptance/features/apiGraphGroup/createGroup.feature
Pradip Subedi ed1bc5ec9f [tests-only][full-ci] test(apiGraphGroup): add acceptance test for configurable LDAP group object class (#12751)
* test(apiGraphGroup): add acceptance test for configurable LDAP group object class

* test(apiGraphGroup): make LDAP object class test portable across test environments

* test: use multilines for message assertion
2026-08-18 16:42:55 +05:45

58 lines
2.3 KiB
Gherkin

Feature: create group
As an admin
I want to create a group
So that I can add users to the group
Background:
Given user "Alice" has been created with default attributes
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
Scenario Outline: admin user creates a group
When user "Alice" creates a group "<group>" using the Graph API
Then the HTTP status code should be "201"
And group "<group>" should exist
Examples:
| group |
| simplegroup |
| España§àôœ€ |
| नेपाली |
| $x<=>[y*z^2+1]! |
| 😅 😆 |
| comma,grp1 |
| Finance (NP) |
| slash\Middle |
@issue-3516
Scenario: admin user tries to create a group that already exists
Given group "mygroup" has been created
When user "Alice" tries to create a group "mygroup" using the Graph API
Then the HTTP status code should be "409"
And group "mygroup" should exist
@issue-5938
Scenario Outline: user other than the admin can't create a group
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Brian" tries to create a group "mygroup" using the Graph API
Then the HTTP status code should be "403"
And group "mygroup" should not exist
Examples:
| user-role |
| Space Admin |
| User |
| User Light |
@issue-5050
Scenario: admin user tries to create a group that is the empty string
When user "Alice" tries to create a group "" using the Graph API
Then the HTTP status code should be "400"
@env-config @issue-11775
Scenario: admin creates a group with the configured LDAP group object class
Given the config "OCIS_LDAP_GROUP_OBJECTCLASS" has been set to "groupOfUniqueNames" for "graph" service
When the administrator creates a group "uniquegroup" using the Graph API
Then the HTTP status code should be "201"
And the LDAP entry "cn=uniquegroup,ou=groups,o=libregraph-idm" should have the object class "groupOfUniqueNames"
And the LDAP entry "cn=uniquegroup,ou=groups,o=libregraph-idm" should not have the object class "groupOfNames"