-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API test for restrictSharingOutsideTheGroup #31715
API test for restrictSharingOutsideTheGroup #31715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good. Just some indent, and a comment about DRY code.
And the OCS status code should be "403" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user shares a file with user who is in his group when sharing outside the group has been restricted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting problem
And the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user tries to share a file with the group he is not member of when sharing outside the group has been restricted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting problem
And the OCS status code should be "404" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user shares a file with the group he is member of when sharing outside the group has been restricted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting problem
} | ||
|
||
/** | ||
* @Then /^user "([^"]*)" should be able to share (?:file|folder|entry) "([^"]*)" with group "([^"]*)"(?: with permissions ([\d]*))? using the API$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make a single function with (user|group)
then decide the 0|1
parameter to createShare()
based on that?
It would save repeating all the other code around the createShare()
calll.
Codecov Report
@@ Coverage Diff @@
## master #31715 +/- ##
=========================================
Coverage 63.14% 63.14%
Complexity 18438 18438
=========================================
Files 1158 1158
Lines 69259 69259
Branches 1260 1260
=========================================
Hits 43733 43733
Misses 25157 25157
Partials 369 369
Continue to review full report at Codecov.
|
32323c2
to
7715908
Compare
Backport on #31736 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR adds test to check the behavior of sharing API when sharing outside the group has been restricted
Related Issue
#31531
How Has This Been Tested?
Locally
Types of changes
Checklist: