Added api test for sharing disabled space (#5048)

This commit is contained in:
Prarup Gurung
2022-11-14 14:02:30 +05:45
committed by GitHub
parent 6a3fa4c461
commit be4646652b
2 changed files with 24 additions and 0 deletions

View File

@@ -87,3 +87,17 @@ Feature: Share spaces
Then the user "Bob" should have a space called "share space" granted to "Bob" with role "viewer"
And for user "Bob" the space "share space" should contain these entries:
| test.txt |
Scenario Outline: A user cannot share a disabled space to another user
Given user "Alice" has disabled a space "share space"
When user "Alice" shares a space "share space" to user "Brian" with role "<role>"
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "Wrong path, file/folder doesn't exist"
And the user "Brian" should not have a space called "share space"
Examples:
| role |
| manager |
| editor |
| viewer |

View File

@@ -91,3 +91,13 @@ Feature: Share spaces via link
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And for user "Alice" the space "share space" should contain the last created public link
Scenario: A user cannot share a disabled space to public via link
Given user "Alice" has disabled a space "share space"
When user "Alice" creates a public link share of the space "share space" with settings:
| permissions | 1 |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "Wrong path, file/folder doesn't exist"
And for user "Alice" the space "share space" should not contain the last created public link