From 3ecf2e56cac8adf392648c6845a3cb0ed8f9a680 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 5 Jan 2024 11:55:31 +0545 Subject: [PATCH] Added test for sending share invitation to empty user id --- .../apiSharingNg/shareInvitations.feature | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/acceptance/features/apiSharingNg/shareInvitations.feature b/tests/acceptance/features/apiSharingNg/shareInvitations.feature index 9e8d72587..7e73238d5 100644 --- a/tests/acceptance/features/apiSharingNg/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNg/shareInvitations.feature @@ -1239,3 +1239,50 @@ Feature: Send a sharing invitations | resource-type | path | | file | /textfile1.txt | | folder | FolderToShare | + + + Scenario Outline: send share invitation with empty user id + 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 | | + | space | Personal | + | shareeId | | + | shareType | user | + | permissionsRole | Viewer | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "pattern": "invalidRequest" + }, + "message": { + "type": "string", + "enum": [ + "Key: 'DriveItemInvite.Recipients[0].ObjectId' Error:Field validation for 'ObjectId' failed on the 'ne' tag" + ] + } + } + } + } + } + """ + Examples: + | resource-type | path | + | file | /textfile1.txt | + | folder | FolderToShare |