Skip to content
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

Add API test for creating a public read-write share of a file #31495

Merged
merged 1 commit into from
May 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions tests/acceptance/features/apiSharing-v1/createShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Feature: sharing
| permissions | 19 |
| uid_owner | user0 |

Scenario: Creating a new public share
Scenario: Creating a new public share of a file
Given user "user0" has been created
When user "user0" creates a share using the API with settings
| path | welcome.txt |
Expand All @@ -62,7 +62,7 @@ Feature: sharing
And the HTTP status code should be "200"
And the last public shared file should be able to be downloaded without a password

Scenario: Creating a new public share with password
Scenario: Creating a new public share of a file with password
Given user "user0" has been created
When user "user0" creates a share using the API with settings
| path | welcome.txt |
Expand All @@ -72,6 +72,23 @@ Feature: sharing
And the HTTP status code should be "200"
And the last public shared file should be able to be downloaded with password "publicpw"

Scenario: Trying to create a new public share of a file with edit permissions results in a read-only share
Given user "user0" has been created
When user "user0" creates a share using the API with settings
| path | welcome.txt |
| shareType | 3 |
| permissions | 31 |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the share fields of the last share should include
| file_target | /welcome.txt |
| path | /welcome.txt |
| item_type | file |
| share_type | 3 |
| permissions | 1 |
| uid_owner | user0 |
And the last public shared file should be able to be downloaded without a password

Scenario: Creating a new public share of a folder
Given user "user0" has been created
When user "user0" creates a share using the API with settings
Expand Down