diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-03-20 11:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 11:45:51 +0100 |
commit | a3739906f62fa9905156ea1922d9a154d9cc0b4a (patch) | |
tree | d610af6e1ec4d7a2e5ffaa428ee4269102ec296d /tests | |
parent | ac1aff7d9249523cc66a7cd890f95f0760f1016a (diff) | |
parent | a1f46db793241d910a5ba456473419d96809a275 (diff) | |
download | nextcloud-server-a3739906f62fa9905156ea1922d9a154d9cc0b4a.tar.gz nextcloud-server-a3739906f62fa9905156ea1922d9a154d9cc0b4a.zip |
Merge pull request #3924 from nextcloud/preview_fixes
Do not generate the max preview twice
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Preview/GeneratorTest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index ddb24cdb3ee..50d46ae932d 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -399,6 +399,10 @@ class GeneratorTest extends \Test\TestCase { ); $result = $this->generator->getPreview($file, $reqX, $reqY, $crop, $mode); - $this->assertSame($preview, $result); + if ($expectedX === $maxX && $expectedY === $maxY) { + $this->assertSame($maxPreview, $result); + } else { + $this->assertSame($preview, $result); + } } } |