[tests-only][full-ci] Api test for user trying to set own personal space quota (#5979)

* api test for user trying to set their own personal space quota

* removed duplicate scenarios for set quota

* updated expected scenario

* fix wrong status code

* updated expected failure scenario after wrong status code fix

---------

Co-authored-by: Michael Barz <mbarz@owncloud.com>
This commit is contained in:
Prajwol Amatya
2023-04-04 12:41:34 +05:45
committed by GitHub
parent aec511a4e6
commit 7baac4f050
4 changed files with 68 additions and 117 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
logger.Debug().
Bool("cansetspacequota", canSetSpaceQuota).
Msg("could not update drive: user is not allowed to set the space quota")
errorcode.NotAllowed.Render(w, r, http.StatusUnauthorized, "user is not allowed to set the space quota")
errorcode.NotAllowed.Render(w, r, http.StatusForbidden, "user is not allowed to set the space quota")
return
}
updateSpaceRequest.StorageSpace.Quota = &storageprovider.Quota{