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

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-08 21:54:09 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-08 21:54:09 +0300
commitdab919f36ef447a2c50eb0f6aef13e9c9da80d47 (patch)
treee15ae5e879baa5b509ab342f46cffc870da0256f /tests
parentbbb075e640a7871b20cb86465cf23c6901bfd994 (diff)
Test empty preview which needs base64 encoding
Diffstat (limited to 'tests')
-rw-r--r--tests/api/GetThumbnailsCest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/api/GetThumbnailsCest.php b/tests/api/GetThumbnailsCest.php
index f9dacd51..73065d12 100644
--- a/tests/api/GetThumbnailsCest.php
+++ b/tests/api/GetThumbnailsCest.php
@@ -84,6 +84,22 @@ class GetThumbnailsCest {
$I->seeResponseContains('"fileid":"99999","status":404');
}
+ public function getThumbnailOfBrokenFile(\Step\Api\User $I) {
+ $I->am('an app');
+ $I->wantTo(
+ 'receive an event with a 500 code when trying to get the thumbnail of a broken file'
+ );
+ $I->getUserCredentialsAndUseHttpAuthentication();
+ $I->haveHttpHeader('Accept', 'text/event-stream');
+ $data = $I->getFilesDataForFolder('');
+ $id = $data['testimage-corrupt.jpg']['id'];
+ $this->params['ids'] = $id;
+ $I->sendGET($this->apiUrl, $this->params);
+ $I->seeResponseCodeIs(200);
+ $I->seeHttpHeader('Content-type', 'text/event-stream;charset=UTF-8');
+ $I->seeResponseContains('"fileid":"' . $id . '","status":500');
+ }
+
/**
* @param \Step\Api\User $I
* @param array $params