-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests-only][full-ci] Add API tests for creating groups (graph API) (#…
- Loading branch information
Showing
5 changed files
with
72 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@api @skipOnOcV10 | ||
Feature: create group | ||
Only user with admin permissions can create new groups | ||
|
||
Background: | ||
Given user "Alice" has been created with default attributes and without skeleton files | ||
And the administrator has given "Alice" the role "Admin" using the settings api | ||
|
||
|
||
Scenario Outline: admin user creates a group | ||
When user "Alice" creates a group "<groupname>" using the Graph API | ||
Then the HTTP status code should be "200" | ||
And group "<groupname>" should exist | ||
Examples: | ||
| groupname | | ||
| simplegroup | | ||
| España§àôœ€ | | ||
| नेपाली | | ||
| $x<=>[y*z^2+1]! | | ||
| 😅 😆 | | ||
| comma,grp1 | | ||
| Finance (NP) | | ||
| slash\Middle | | ||
|
||
|
||
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 | ||
And the HTTP status code should be "400" | ||
And group "mygroup" should exist | ||
|
||
|
||
Scenario: normal user tries to create a group | ||
Given user "Brian" has been created with default attributes and without skeleton files | ||
When user "Brian" tries to create a group "mygroup" using the Graph API | ||
And the HTTP status code should be "401" | ||
And group "mygroup" should not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters