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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-03-12 16:43:27 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-03-13 11:20:32 +0300
commit84a148aac19f4e5f3d1dd48f6b9c7622a4364a74 (patch)
tree976d24caed0bd6cbdb463a864e6a5857cd5960e8 /apps/sharebymail/tests
parentdbead0c0fa3011721755105490dc82de7e7e3463 (diff)
Properly respect hide download on sharebymail
fixes #19484 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/sharebymail/tests')
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index 27805691ecc..07bba57a19c 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -313,7 +313,7 @@ class ShareByMailProviderTest extends TestCase {
);
}
-
+
public function testCreateFailed() {
$this->expectException(\Exception::class);
@@ -356,7 +356,7 @@ class ShareByMailProviderTest extends TestCase {
}
-
+
public function testCreateMailShareFailed() {
$this->expectException(\OC\HintException::class);
@@ -406,6 +406,7 @@ class ShareByMailProviderTest extends TestCase {
$token = 'token';
$password = 'password';
$sendPasswordByTalk = true;
+ $hideDownload = true;
$instance = $this->getInstance();
@@ -421,7 +422,8 @@ class ShareByMailProviderTest extends TestCase {
$permissions,
$token,
$password,
- $sendPasswordByTalk
+ $sendPasswordByTalk,
+ $hideDownload
]
);
@@ -442,6 +444,7 @@ class ShareByMailProviderTest extends TestCase {
$this->assertSame($token, $result[0]['token']);
$this->assertSame($password, $result[0]['password']);
$this->assertSame($sendPasswordByTalk, (bool)$result[0]['password_by_talk']);
+ $this->assertSame($hideDownload, (bool)$result[0]['hide_download']);
}
@@ -580,7 +583,7 @@ class ShareByMailProviderTest extends TestCase {
$this->assertInstanceOf('OCP\Share\IShare', $result);
}
-
+
public function testGetShareByIdFailed() {
$this->expectException(\OCP\Share\Exceptions\ShareNotFound::class);
@@ -665,7 +668,7 @@ class ShareByMailProviderTest extends TestCase {
$this->assertInstanceOf('OCP\Share\IShare', $result);
}
-
+
public function testGetShareByTokenFailed() {
$this->expectException(\OCP\Share\Exceptions\ShareNotFound::class);
@@ -782,7 +785,7 @@ class ShareByMailProviderTest extends TestCase {
$this->assertSame($token, $result['token']);
}
-
+
public function testGetRawShareFailed() {
$this->expectException(\OCP\Share\Exceptions\ShareNotFound::class);