Now that we have filenames with hashes in them
the likelyhood of finding the numbers 4, 0, and 4
not as an http status are much higher, leading to
a false negative on tests that look at the http
status code. Looking for the string ' 404 ' narrows
the search to actual 404 errors (at least until we
have a file that's exactly 404 bytes long in the
offline interface).
Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
use Test::More tests => 1;
-my $command = 'wget --no-check-certificate -m https://localhost/eg/staff/offline-interface 2>&1 |grep -B 2 404|grep https|grep -v robots.txt|wc -l';
+my $command = 'wget --no-check-certificate -m https://localhost/eg/staff/offline-interface 2>&1 |grep -B 2 " 404 "|grep https|grep -v robots.txt|wc -l';
chomp(my $output = `$command`);
is($output, '0', "No missing assets required by the offline interface");