diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-03-20 13:45:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 13:45:51 +0300 |
commit | a3739906f62fa9905156ea1922d9a154d9cc0b4a (patch) | |
tree | d610af6e1ec4d7a2e5ffaa428ee4269102ec296d /tests/lib | |
parent | ac1aff7d9249523cc66a7cd890f95f0760f1016a (diff) | |
parent | a1f46db793241d910a5ba456473419d96809a275 (diff) |
Merge pull request #3924 from nextcloud/preview_fixes
Do not generate the max preview twice
Diffstat (limited to 'tests/lib')
-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); + } } } |