mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 04:58:31 -05:00
test(api): split search user tests
This commit is contained in:
@@ -21,7 +21,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"onPremisesSamAccountName",
|
||||
"accountEnabled",
|
||||
"userType"
|
||||
@@ -35,10 +34,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["brian@example.org"]
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"enum": ["Brian"]
|
||||
@@ -1378,56 +1373,6 @@ Feature: get users
|
||||
}
|
||||
"""
|
||||
|
||||
@env-config
|
||||
Scenario: non-admin user searches other users by display name (OCIS_SHOW_USER_EMAIL_IN_RESULTS enabled)
|
||||
Given the config "OCIS_SHOW_USER_EMAIL_IN_RESULTS" has been set to "true"
|
||||
When user "Brian" searches for user "ali" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"enum": ["Alice Hansen"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["alice@example.org"]
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: non-admin user tries to search for a user by display name with less than 3 characters
|
||||
When user "Brian" tries to search for user "al" using Graph API
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
Reference in New Issue
Block a user