Merge pull request #8308 from owncloud/add-test-to-share-twice-with-same-user

[full-ci] [tests-only] Added test for sending share invitation to user already received share
This commit is contained in:
Prarup Gurung
2024-01-30 10:35:56 +05:45
committed by GitHub

View File

@@ -1537,3 +1537,55 @@ Feature: Send a sharing invitations
| Manager | file | /textfile1.txt |
| Co Owner | folder | FolderToShare |
| Manager | folder | FolderToShare |
Scenario Outline: send share invitation to already shared user
Given user "Alice" has uploaded file with content "to share" to "textfile1.txt"
And user "Alice" has created folder "FolderToShare"
And user "Alice" has sent the following share invitation:
| resourceType | <resource-type> |
| resource | <path> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" tries to send the following share invitation using the Graph API:
| resourceType | <resource-type> |
| resource | <path> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"enum": ["nameAlreadyExists"]
},
"message": {
"type": "string",
"pattern": "^error creating share: error: already exists:.*$"
}
}
}
}
}
"""
Examples:
| resource-type | path |
| file | /textfile1.txt |
| folder | FolderToShare |