aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/Sharing.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/Sharing.php')
-rw-r--r--build/integration/features/bootstrap/Sharing.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index 0958ab5b64b..4ce2e12e29d 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -164,9 +164,23 @@ trait Sharing {
}
/**
- * @Then /^last link share with password "([^"]*)" can be downloaded$/
+ * @Then /^last share can be downloaded$/
*/
- public function lastLinkShareWithPasswordCanBeDownloaded($password) {
+ public function lastShareCanBeDownloaded() {
+ if (count($this->lastShareData->data->element) > 0) {
+ $token = $this->lastShareData->data[0]->token;
+ } else {
+ $token = $this->lastShareData->data->token;
+ }
+
+ $fullUrl = substr($this->baseUrl, 0, -4) . "index.php/s/" . $token . "/download";
+ $this->checkDownload($fullUrl, null, 'text/plain');
+ }
+
+ /**
+ * @Then /^last share with password "([^"]*)" can be downloaded$/
+ */
+ public function lastShareWithPasswordCanBeDownloaded($password) {
if (count($this->lastShareData->data->element) > 0) {
$token = $this->lastShareData->data[0]->token;
} else {