Skip to content

Commit

Permalink
Use valid orientation flag for test image
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davea authored and dracos committed Jul 6, 2016
1 parent cb6e735 commit a060d03
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions t/app/controller/photo.t
Original file line number Diff line number Diff line change
Expand Up @@ -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';
};
};
Expand Down
Binary file modified t/app/controller/sample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion t/app/model/photoset.t
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
Expand Down
2 changes: 1 addition & 1 deletion t/open311/getservicerequestupdates.t
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ subtest 'Update with media_url includes image in update' => sub {
is $problem->comments->count, 1, 'comment count';
my $c = $problem->comments->first;
is $c->external_id, 638344;
is $c->photo, '1cdd4329ceee2234bd4e89cb33b42061a0724687.jpeg', 'photo exists';
is $c->photo, '7f09ef2c3933731d47121fee1b8038b3fdd3bc77.jpeg', 'photo exists';
};

foreach my $test (
Expand Down

0 comments on commit a060d03

Please sign in to comment.