summaryrefslogtreecommitdiffstats
path: root/build/integration/sharing_features/sharing-v1.feature
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-12 11:52:53 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-11-16 13:20:19 +0000
commit4e094b71b67d60b966135adb80ef6b37585fef30 (patch)
tree4c9ec641d4794d16e3aa4da71e5c259f705296c1 /build/integration/sharing_features/sharing-v1.feature
parent8832d15069bb2cd0af3c7021f3d9f547b52ee679 (diff)
downloadnextcloud-server-4e094b71b67d60b966135adb80ef6b37585fef30.tar.gz
nextcloud-server-4e094b71b67d60b966135adb80ef6b37585fef30.zip
Add integration tests for creating shares with default expiration dates
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/sharing_features/sharing-v1.feature')
-rw-r--r--build/integration/sharing_features/sharing-v1.feature106
1 files changed, 106 insertions, 0 deletions
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature
index 38eb2d8a812..b5b4f5341af 100644
--- a/build/integration/sharing_features/sharing-v1.feature
+++ b/build/integration/sharing_features/sharing-v1.feature
@@ -391,6 +391,112 @@ Feature: sharing
And Share fields of last share match with
| permissions | 7 |
+ Scenario: Creating a new internal share with default expiration date
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ 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"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ And 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 internal share with relaxed default expiration date
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ 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 parameter "internal_defaultExpDays" of app "core" is set to "1"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ And 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 | +1 days |
+
+ Scenario: Creating a new internal share with relaxed default expiration date too large
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ 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 parameter "internal_defaultExpDays" of app "core" is set to "10"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ And 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 link share with default expiration date
+ Given user "user0" exists
+ And As an "user0"
+ And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_expire_after_n_days" of app "core" is set to "3"
+ When creating a share with
+ | path | welcome.txt |
+ | shareType | 3 |
+ And 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 link share with relaxed default expiration date
+ Given user "user0" exists
+ And As an "user0"
+ And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_expire_after_n_days" of app "core" is set to "3"
+ And parameter "link_defaultExpDays" of app "core" is set to "1"
+ When creating a share with
+ | path | welcome.txt |
+ | shareType | 3 |
+ And 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 | +1 days |
+
+ Scenario: Creating a new link share with relaxed default expiration date too large
+ Given user "user0" exists
+ And As an "user0"
+ And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_expire_after_n_days" of app "core" is set to "3"
+ And parameter "link_defaultExpDays" of app "core" is set to "10"
+ When creating a share with
+ | path | welcome.txt |
+ | shareType | 3 |
+ And 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: getting all shares of a user using that user
Given user "user0" exists
And user "user1" exists