Skip to content

Commit

Permalink
tests: adapt acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Jul 29, 2024
1 parent d7adeac commit aa6bc4a
Showing 1 changed file with 34 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1378,43 +1378,58 @@ Feature: Create a link share for a resource
When user "Alice" tries to create the following space link share using permissions endpoint of the Graph API:
| space | <drive> |
| permissionsRole | internal |
Then the HTTP status code should be "400"
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"required": [
"hasPassword",
"id",
"link"
],
"properties": {
"error": {
"hasPassword": {
"const": true
},
"id": {
"type": "string",
"pattern": "^[a-zA-Z]{15}$"
},
"link": {
"type": "object",
"required": [
"code",
"innererror",
"message"
"@libre.graph.displayName",
"@libre.graph.quickLink",
"preventsDownload",
"type",
"webUrl"
],
"properties": {
"code": {
"const": "invalidRequest"
"@libre.graph.displayName": {
"const": ""
},
"innererror": {
"type": "object",
"required": [
"date",
"request-id"
]
"@libre.graph.quickLink": {
"const": false
},
"message": {
"const": "<message>"
"preventsDownload": {
"const": false
},
"type": {
"const": "<permissions-role>"
},
"webUrl": {
"type": "string",
"pattern": "^%base_url%/s/[a-zA-Z]{15}$"
}
}
}
}
}
"""
Examples:
| drive | message |
| Personal | cannot create link on personal space root |
| Shares | no share permission |
| drive | permissions-role |
| Shares | internal |


Scenario Outline: try to create an internal link share with password of a Personal and Shares drives using permissions endpoint
Expand Down

0 comments on commit aa6bc4a

Please sign in to comment.