aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/sharing_features/sharing-v1.feature
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/sharing_features/sharing-v1.feature')
-rw-r--r--build/integration/sharing_features/sharing-v1.feature63
1 files changed, 61 insertions, 2 deletions
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature
index 00a754d54d3..25f168db2e7 100644
--- a/build/integration/sharing_features/sharing-v1.feature
+++ b/build/integration/sharing_features/sharing-v1.feature
@@ -1,3 +1,5 @@
+# SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: sharing
Background:
Given using api version "1"
@@ -54,7 +56,7 @@ Feature: sharing
| shareWith | a-room-token |
| shareType | 10 |
Then the OCS status code should be "403"
- And the HTTP status code should be "401"
+ And the HTTP status code should be "200"
Scenario: Creating a new mail share
Given dummy mail server is listening
@@ -84,7 +86,7 @@ Feature: sharing
Scenario: Creating a new mail share with password when password protection is enforced
Given dummy mail server is listening
And As an "admin"
- And parameter "enforcePasswordProtection" of app "sharebymail" is set to "yes"
+ And parameter "shareapi_enforce_links_password" of app "core" is set to "yes"
And user "user0" exists
And As an "user0"
When creating a share with
@@ -229,6 +231,62 @@ Feature: sharing
| url | AN_URL |
| mimetype | httpd/unix-directory |
+ Scenario: Creating a new share with expiration date empty, when default expiration is set
+ Given user "user0" exists
+ And user "user1" exists
+ And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
+ And As an "user0"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ | expireDate | |
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Getting info of last share
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | expiration ||
+
+ Scenario: Creating a new share with expiration date removed, when default expiration is set
+ Given user "user0" exists
+ And user "user1" exists
+ And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
+ And As an "user0"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Getting info of last share
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | expiration | +3 days |
+
+ Scenario: Creating a new share with expiration date null, when default expiration is set
+ Given user "user0" exists
+ And user "user1" exists
+ And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
+ And As an "user0"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ | expireDate | null |
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Getting info of last share
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | expiration | +3 days |
+
Scenario: Creating a new public share, updating its password and getting its info
Given user "user0" exists
And As an "user0"
@@ -269,6 +327,7 @@ Feature: sharing
| shareType | 3 |
And Updating last share with
| permissions | 7 |
+ | publicUpload | true |
And the OCS status code should be "100"
And the HTTP status code should be "200"
And Getting info of last share