diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-13 11:39:16 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-14 13:52:15 +0000 |
commit | c4cb0a4d2754c2a5ead4fcb6300c473aa8357b95 (patch) | |
tree | 7b8c9e24692d609b862bbd5122446846d8f052be /t | |
parent | 9e9460b8ff4bdccf9dc0166331688f2f0818b29f (diff) |
Add option to symlink full size photos.
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/photo.t | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/t/app/controller/photo.t b/t/app/controller/photo.t index 19249611a..842daa0dc 100644 --- a/t/app/controller/photo.t +++ b/t/app/controller/photo.t @@ -98,12 +98,15 @@ subtest "Check photo uploading URL and endpoints work" => sub { my $p = FixMyStreet::DB->resultset("Problem")->first; - $mech->get_ok('/photo/temp.74e3362283b6ef0c48686fb0e161da4043bbcc97.jpeg'); - $image_file = FixMyStreet->path_to('web/photo/temp.74e3362283b6ef0c48686fb0e161da4043bbcc97.jpeg'); - ok -e $image_file, 'File uploaded to temp'; - $mech->get_ok('/photo/' . $p->id . '.jpeg'); - $image_file = FixMyStreet->path_to('web/photo/' . $p->id . '.jpeg'); - ok -e $image_file, 'File uploaded to temp'; + foreach my $i ( + '/photo/temp.74e3362283b6ef0c48686fb0e161da4043bbcc97.jpeg', + '/photo/fulltemp.74e3362283b6ef0c48686fb0e161da4043bbcc97.jpeg', + '/photo/' . $p->id . '.jpeg', + '/photo/' . $p->id . '.full.jpeg') { + $mech->get_ok($i); + $image_file = FixMyStreet->path_to("web$i"); + ok -e $image_file, 'File uploaded to temp'; + } my $res = $mech->get('/photo/0.jpeg'); is $res->code, 404, "got 404"; }; |