Skip to content

Commit

Permalink
Added test for sending share invitation to wrong objectId
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Jan 23, 2024
1 parent ee931c9 commit 3ba6ed6
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions tests/acceptance/features/apiSharingNg/shareInvitations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1117,3 +1117,70 @@ Feature: Send a sharing invitations
| Co Owner | folder | FolderToShare |
| Uploader | folder | FolderToShare |
| Manager | folder | FolderToShare |


Scenario Outline: send share invitation to wrong user id with different roles
Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
And user "Alice" has created folder "FolderToShare"
When user "Alice" tries to send the following share invitation using the Graph API:
| resourceType | <resource-type> |
| resource | <path> |
| space | Personal |
| shareeId | a4c0c83e-ae24-4870-93c3-fcaf2a2228f7 |
| shareType | user |
| role | <role> |
Then the HTTP status code should be "500"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "array",
"items": {
"error": {
"type": "object",
"required": [
"code",
"message",
"innererror"
],
"properties": {
"code": {
"type": "string",
"pattern": "generalException"
},
"message": {
"type": "string",
"enum": [
"Internal Server Error"
]
},
"innererror": {
"type": "string",
"required": [
"date",
"request-id"
]
}
}
}
}
}
}
}
"""
Examples:
| role | resource-type | path |
| Viewer | file | /textfile1.txt |
| File Editor | file | /textfile1.txt |
| Co Owner | file | /textfile1.txt |
| Manager | file | /textfile1.txt |
| Viewer | folder | FolderToShare |
| Editor | folder | FolderToShare |
| Co Owner | folder | FolderToShare |
| Uploader | folder | FolderToShare |
| Manager | folder | FolderToShare |

0 comments on commit 3ba6ed6

Please sign in to comment.