Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-08-17 23:01:30 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-09-26 11:54:28 +0300
commitb77d4b2b844c4b874c258e70724c672fba86518e (patch)
tree9ec129b331ef70fc61fc50c7514b19db4c0d1762 /tests
parent41a15569570b1b1208d7a4c2221fb0a9efcb2711 (diff)
Add integration tests for getting the room for link share with password
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/bootstrap/SharingContext.php5
-rw-r--r--tests/integration/features/conversation/files.feature15
2 files changed, 18 insertions, 2 deletions
diff --git a/tests/integration/features/bootstrap/SharingContext.php b/tests/integration/features/bootstrap/SharingContext.php
index 262af5b7a..987ceee8f 100644
--- a/tests/integration/features/bootstrap/SharingContext.php
+++ b/tests/integration/features/bootstrap/SharingContext.php
@@ -211,9 +211,10 @@ class SharingContext implements Context {
* @param string $user
* @param string $path
* @param int $statusCode
+ * @param TableNode|null $body
*/
- public function userSharesByLinkWithOcs(string $user, string $path, int $statusCode) {
- $this->userSharesByLink($user, $path);
+ public function userSharesByLinkWithOcs(string $user, string $path, int $statusCode, TableNode $body = null) {
+ $this->userSharesByLink($user, $path, $body);
$this->theOCSStatusCodeShouldBe($statusCode);
}
diff --git a/tests/integration/features/conversation/files.feature b/tests/integration/features/conversation/files.feature
index 84c22aeda..69fce170a 100644
--- a/tests/integration/features/conversation/files.feature
+++ b/tests/integration/features/conversation/files.feature
@@ -87,6 +87,15 @@ Feature: conversation/files
And user "participant3" is not participant of room "file last share room"
And user "guest" is not participant of room "file last share room"
+ Scenario: get room for link share protected by password
+ Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100
+ And user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ When user "participant1" gets the room for last share with 404
+ And user "participant2" gets the room for last share with 404
+ And user "participant3" gets the room for last share with 404
+ And user "guest" gets the room for last share with 404
+
Scenario: get room for link share of a folder
Given user "participant1" creates folder "/test"
And user "participant1" shares "test" by link with OCS 100
@@ -108,6 +117,12 @@ Feature: conversation/files
When user "participant1" gets the room for path "welcome.txt" with 200
Then user "participant1" is not participant of room "file welcome.txt room"
+ Scenario: get room for file shared by link and protected by password
+ Given user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ When user "participant1" gets the room for path "welcome.txt" with 200
+ Then user "participant1" is not participant of room "file welcome.txt room"
+
Scenario: get room for folder shared by link
Given user "participant1" creates folder "/test"
And user "participant1" shares "test" by link with OCS 100