diff options
author | Dave Arter <davea@mysociety.org> | 2016-06-27 12:42:31 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-06 13:04:13 +0100 |
commit | a060d03f36275f1fae1c041cca813bddeef6287c (patch) | |
tree | c983573df4759c1a37397c6d5de870167116a627 /t/app | |
parent | cb6e7350bdc42e4d329ed1dcc05c074bca697384 (diff) |
Use valid orientation flag for test image
jhead 3.00 considers 0 an invalid value for EXIF orientation and will replace it
with 1 when run with the -autorot flag. This was causing a test failure as the
SHA hash of the sample image was being changed.
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/photo.t | 6 | ||||
-rw-r--r-- | t/app/controller/sample.jpg | bin | 22588 -> 22570 bytes | |||
-rw-r--r-- | t/app/model/photoset.t | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/t/app/controller/photo.t b/t/app/controller/photo.t index 4cec82c44..a065c7732 100644 --- a/t/app/controller/photo.t +++ b/t/app/controller/photo.t @@ -66,12 +66,12 @@ subtest "Check multiple upload worked" => sub { ok $mech->success, 'Made request with multiple photo upload'; $mech->base_is('http://localhost/report/new'); $mech->content_like( - qr[(<img align="right" src="/photo/temp.1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg" alt="">\s*){3}], + qr[(<img align="right" src="/photo/temp.7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg" alt="">\s*){3}], 'Three uploaded pictures are all shown, safe'); $mech->content_contains( - 'name="upload_fileid" value="1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg,1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg,1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg"', + 'name="upload_fileid" value="7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg,7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg,7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg"', 'Returned upload_fileid contains expected hash, 3 times'); - my $image_file = path($UPLOAD_DIR, '1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg'); + my $image_file = path($UPLOAD_DIR, '7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg'); ok $image_file->exists, 'File uploaded to temp'; }; }; diff --git a/t/app/controller/sample.jpg b/t/app/controller/sample.jpg Binary files differindex 23198cb83..4930821c4 100644 --- a/t/app/controller/sample.jpg +++ b/t/app/controller/sample.jpg diff --git a/t/app/model/photoset.t b/t/app/model/photoset.t index 577e39eb1..f0fc601e2 100644 --- a/t/app/model/photoset.t +++ b/t/app/model/photoset.t @@ -58,7 +58,7 @@ subtest 'Photoset with photo inline in DB' => sub { my $report = make_report( $image_path->slurp ); my $photoset = $report->get_photoset(); is $photoset->num_images, 1, 'Found just 1 image'; - is $photoset->data, '1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg'; + is $photoset->data, '7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg'; }; $image_path->copy( path( $UPLOAD_DIR, '0123456789012345678901234567890123456789.jpeg' ) ); |