The cover image upload test assumes that it will be run from exactly one
location, but that's not necessarily true. This commit uses FindBin to
provide the right filesystem context for the test to find the files it
needs.
[Code by Galen, commit message by Mike]
Signed-off-by: Mike Rylander <mrylander@gmail.com>
use LWP::UserAgent;
use File::Fetch;
use HTTP::Request::Common qw(POST);
+use FindBin;
diag("test image uploader");
Content_Type => 'multipart/form-data',
Content => [
# we're going for an image parse error
- jacket_upload => [ '34-lp1787968-cover-uploader.t' ],
+ jacket_upload => [ "$FindBin::Bin/34-lp1787968-cover-uploader.t" ],
bib_record => 1,
ses => $authtoken
]
$target,
Content_Type => 'multipart/form-data',
Content => [
- jacket_upload => [ '../../../web/images/green_check.png' ],
+ jacket_upload => [ "$FindBin::Bin/../../../web/images/green_check.png" ],
bib_record => 1,
ses => $authtoken
]