mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-02 08:49:29 -05:00
test for adding users to a group using invalid JSON (#5931)
This commit is contained in:
@@ -253,3 +253,37 @@ Feature: add users to group
|
||||
And user "Brian" has been added to group "music"
|
||||
When the administrator "Alice" tries to add a group "music" to a group "student" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
|
||||
|
||||
Scenario Outline: admin tries to add a user to a group with invalid JSON
|
||||
Given the administrator has given "Alice" the role "Admin" using the settings api
|
||||
And these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
When user "Alice" tries to add user "Brian" to group "grp1" with invalid JSON "<invalid-json>" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
Examples:
|
||||
| invalid-json |
|
||||
| {'@odata.id': 'https://localhost:9200/graph/v1.0/users/%user_id%',} |
|
||||
| {'@odata.id'- 'https://localhost:9200/graph/v1.0/users/%user_id%'} |
|
||||
| {@odata.id: https://localhost:9200/graph/v1.0/users/%user_id%} |
|
||||
|
||||
|
||||
Scenario Outline: admin tries to add multiple users to a group at once with invalid JSON
|
||||
Given the administrator has given "Alice" the role "Admin" using the settings api
|
||||
And these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
When user "Alice" tries to add the following users to a group "grp1" at once with invalid JSON "<invalid-json>" using the Graph API
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
Then the HTTP status code should be "400"
|
||||
Examples:
|
||||
| invalid-json |
|
||||
| {'members@odata.bind': ['https://localhost:9200/graph/v1.0/users/%user_id%',,'https://localhost:9200/graph/v1.0/users/%user_id%']} |
|
||||
| {'members@odata.bind'- ['https://localhost:9200/graph/v1.0/users/%user_id%','https://localhost:9200/graph/v1.0/users/%user_id%']} |
|
||||
| {'members@odata.bind': ['https://localhost:9200/graph/v1.0/users/%user_id%'.'https://localhost:9200/graph/v1.0/users/%user_id%']} |
|
||||
|
||||
Reference in New Issue
Block a user