diff options
Diffstat (limited to 'apps/files/tests/Controller')
-rw-r--r-- | apps/files/tests/Controller/ApiControllerTest.php | 13 | ||||
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index afef351aea7..1fb6490f143 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -246,4 +246,17 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $actual); } + + public function testCropImagePreviews() { + $crop = true; + + $this->config->expects($this->once()) + ->method('setUserValue') + ->with($this->user->getUID(), 'files', 'crop_image_previews', $crop); + + $expected = new Http\Response(); + $actual = $this->apiController->cropImagePreviews($crop); + + $this->assertEquals($expected, $actual); + } } diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 2b40697642c..fc2b82de9c8 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -135,6 +135,7 @@ class ViewControllerTest extends TestCase { [$this->user->getUID(), 'files', 'file_sorting', 'name', 'name'], [$this->user->getUID(), 'files', 'file_sorting_direction', 'asc', 'asc'], [$this->user->getUID(), 'files', 'show_hidden', false, false], + [$this->user->getUID(), 'files', 'crop_image_previews', true, true], [$this->user->getUID(), 'files', 'show_grid', true], ]); @@ -316,6 +317,7 @@ class ViewControllerTest extends TestCase { 'defaultFileSorting' => 'name', 'defaultFileSortingDirection' => 'asc', 'showHiddenFiles' => 0, + 'cropImagePreviews' => 1, 'fileNotFound' => 0, 'allowShareWithLink' => 'yes', 'appNavigation' => $nav, |