public function getPreviewOfBrokenFile(\Step\Api\User $I) { $I->am('an app'); $I->wantTo('get the preview of a broken file'); $I->expect('an 500 status and an error message'); $I->getUserCredentialsAndUseHttpAuthentication(); $data = $I->getFilesDataForFolder(''); $file = $data['testimage-corrupt.jpg']; $url = $this->apiUrl . '/' . $file['id'] . '/1920/1080'; $I->sendGET($url); $I->seeResponseCodeIs(500); $I->seeResponseContainsJson(['success' => false]); }
public function getListOfForbiddenPath(\Step\Api\User $I) { $params = $this->params; // This folder contains a .nomedia file $params['location'] = 'folder4'; $I->am('an app'); $I->wantTo('get the list of files of a folder which contains the .nomedia file'); $I->getUserCredentialsAndUseHttpAuthentication(); $I->sendGET($this->apiUrl, $params); $I->seeResponseCodeIs(403); $I->seeResponseIsJson(); $I->seeResponseContainsJson(['message' => 'Album is private or unavailable']); }